Skip to content

Commit

Permalink
Fixed eslint warning about imports
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbull committed Apr 18, 2017
1 parent 06df564 commit 18a73f0
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 69 deletions.
57 changes: 0 additions & 57 deletions .eslintrc

This file was deleted.

53 changes: 53 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
parser: babel-eslint

extends:
- plugin:import/errors
- plugin:import/warnings

plugins:
- react

env:
browser: true
node: true
es6: true
mocha: true

ecmaFeatures:
jsx: true

rules:
# Strict mode
strict: [2, never]

# Code style
indent: [2, 2]
quotes: [2, single]
no-unused-vars: 1
no-undef: 1
object-curly-spacing: [2, always]

# JSX
jsx-quotes: 1

# React
react/display-name: 0
react/jsx-boolean-value: 1
react/jsx-closing-bracket-location: 1
react/jsx-curly-spacing: 1
react/jsx-max-props-per-line: 0
react/jsx-indent-props: 0
react/jsx-no-duplicate-props: 1
react/jsx-no-undef: 1
react/jsx-sort-prop-types: 0
react/jsx-sort-props: 0
react/jsx-uses-react: 1
react/jsx-uses-vars: 1
react/no-danger: 0
react/no-set-state: 0
react/no-did-mount-set-state: 1
react/no-did-update-set-state: 1
react/no-multi-comp: 0
react/no-unknown-property: 1
react/self-closing-comp: 1
react/jsx-wrap-multilines: 1
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.3.0 (April 17th, 2017)

- Added prop-types dependency to avoid deprecation in React 16

## 0.2.19 (March 14th, 2017)

- Removed rubber band effect from list view
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-desktop",
"author": "Gabriel Bull",
"version": "0.2.19",
"version": "0.3.0",
"description": "React UI Components for macOS Sierra and Windows 10",
"main": "./index.js",
"keywords": [
Expand Down Expand Up @@ -52,6 +52,7 @@
"babel-preset-stage-0": "^6.24.1",
"chai": "^3.5.0",
"eslint": "^3.19.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-react": "^6.10.3",
"html-webpack-plugin": "^2.28.0",
"jsdom": "^9.12.0",
Expand Down
3 changes: 1 addition & 2 deletions src/navPane/windows/item/title/title.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { keyframes } from 'radium';
import Radium, { keyframes } from 'radium';
import styles from '../../style/windows10';
import Radium from 'radium';

var appear = keyframes({
'0%': {
Expand Down
2 changes: 1 addition & 1 deletion src/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function os() {
// explicitly set these to avoid issues
const w = window || null;
const n = navigator || null;
const p = process || (window && window.process) || null;
const p = process || (w && w.process) || null;

// via node
if (p && p.platform) {
Expand Down
3 changes: 1 addition & 2 deletions src/radio/macOs/radio.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Hidden, { hiddenPropTypes } from '../../style/hidden';
import { getState } from 'radium';
import Radium, { getState } from 'radium';
import styles from './styles/10.11';
import Text from '../../text/macOs/text';
import Circle from './circle';
import Radium from 'radium';
import ValueRef from '../../ValueRef';
import WindowFocus from '../../windowFocus';

Expand Down
3 changes: 1 addition & 2 deletions src/radio/windows/radio.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getState } from 'radium';
import Radium, { getState } from 'radium';
import styles from './styles/windows';
import Text from '../../text/windows/text';
import { ThemeContext, themePropTypes, themeContextTypes } from '../../style/theme/windows';
import Hidden, { hiddenPropTypes } from '../../style/hidden';
import { ColorContext, colorPropTypes, colorContextTypes } from '../../style/color/windows';
import Radium from 'radium';
import ValueRef from '../../ValueRef';

@ValueRef()
Expand Down
3 changes: 1 addition & 2 deletions src/titleBar/windows/controls/close.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { Component } from 'react';
import { getState } from 'radium';
import Radium, { getState } from 'radium';
import WindowFocus from '../../../windowFocus';
import { themeContextTypes } from '../../../style/theme/windows';
import { backgroundContextTypes } from '../../../style/background/windows';
import { isDarkColor } from '../../../color';
import Radium from 'radium'

const styles = {
button: {
Expand Down
3 changes: 1 addition & 2 deletions test/tests/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { expect } from 'chai';
import { os } from '../../index';
import { MACOS, WINDOWS } from '../../src/os';
import * as components from '../../index'

describe('index', () => {
it('detect os', () => {
expect(os()).to.be.oneOf([MACOS, WINDOWS]);
expect(components.os()).to.be.oneOf([MACOS, WINDOWS]);
});

it('should be exported', () => {
Expand Down

0 comments on commit 18a73f0

Please sign in to comment.