diff --git a/.eslintrc b/.eslintrc
index 34a4aabb..03a58a79 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -32,7 +32,7 @@
"comma-style": [2, "last"],
"complexity": [0, 11],
"constructor-super": [2],
- "consistent-return": [2],
+ "consistent-return": [0],
"consistent-this": [0, "that"],
"curly": [2, "multi-line"],
"default-case": [2],
@@ -44,7 +44,6 @@
"func-names": [0],
"func-style": [0, "declaration"],
"generator-star-spacing": [2, "after"],
- "strict": [2, "always"],
"guard-for-in": [0],
"handle-callback-err": [0],
"key-spacing": [2, {
@@ -79,7 +78,6 @@
"no-else-return": [0],
"no-empty": [2],
"no-empty-character-class": [2],
- "no-empty-label": [2],
"no-eq-null": [0],
"no-eval": [2],
"no-ex-assign": [2],
@@ -173,16 +171,9 @@
"quote-props": [0],
"radix": [0],
"semi": [2],
- "semi-spacing": [2, {
- "before": false,
- "after": true
- }],
"sort-vars": [0],
- "space-after-keywords": [2, "always"],
- "space-before-function-paren": [2, {
- "anonymous": "always",
- "named": "always"
- }],
+ "keyword-spacing": [2, {"after": true}],
+ "space-before-function-paren": [2, { "anonymous": "always", "named": "always" }],
"space-before-blocks": [0, "always"],
"space-in-brackets": [0, "never", {
"singleValue": true,
@@ -194,7 +185,6 @@
}],
"space-in-parens": [2, "never"],
"space-infix-ops": [2],
- "space-return-throw-case": [2],
"space-unary-ops": [2, {
"words": true,
"nonwords": false
@@ -220,7 +210,7 @@
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-undef": 1,
"react/jsx-pascal-case": 1,
- "react/jsx-sort-prop-types": 1,
+ "react/sort-prop-types": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
diff --git a/.nvmrc b/.nvmrc
index 80895903..cc2fbe89 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-4.3.0
+4.3.2
diff --git a/.travis.yml b/.travis.yml
index 697d35da..18457a66 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - "4.2.1"
+ - "4.3.2"
script:
- npm run lint
- npm test
diff --git a/components/checkbox/Check.jsx b/components/checkbox/Check.jsx
index c4f56ec6..9dc9a7be 100644
--- a/components/checkbox/Check.jsx
+++ b/components/checkbox/Check.jsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
import ClassNames from 'classnames';
import Ripple from '../ripple';
import style from './style';
@@ -11,6 +11,12 @@ const Check = ({checked, children, onMouseDown}) => {
return
{children}
;
};
+Check.propTypes = {
+ checked: PropTypes.bool,
+ children: PropTypes.any,
+ onMouseDown: PropTypes.func
+};
+
export default Ripple({
className: style.ripple,
spread: 2.6,
diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx
index 9f697839..803fb11b 100644
--- a/components/checkbox/Checkbox.jsx
+++ b/components/checkbox/Checkbox.jsx
@@ -34,7 +34,7 @@ class Checkbox extends React.Component {
}
render () {
- const { onChange, ...others } = this.props;
+ const { onChange, ...others } = this.props; //eslint-disable-line no-unused-vars
const className = ClassNames(style.field, {
[style.disabled]: this.props.disabled
}, this.props.className);
diff --git a/components/list/ListItem.jsx b/components/list/ListItem.jsx
index 138f8487..abb57849 100644
--- a/components/list/ListItem.jsx
+++ b/components/list/ListItem.jsx
@@ -52,7 +52,7 @@ class ListItem extends React.Component {
}
render () {
- const {onMouseDown, to, onClick, ripple, ...other} = this.props;
+ const {onMouseDown, to, onClick, ripple, ...other} = this.props; //eslint-disable-line no-unused-vars
const children = this.groupChildren();
const content = ;
let className = style.listItem;
diff --git a/components/list/ListItemAction.jsx b/components/list/ListItemAction.jsx
index 82388b26..9ecdea06 100644
--- a/components/list/ListItemAction.jsx
+++ b/components/list/ListItemAction.jsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
import style from './style';
const ListItemAction = ({action}) => {
@@ -13,6 +13,7 @@ const ListItemAction = ({action}) => {
};
ListItemAction.propTypes = {
+ action: PropTypes.object
};
ListItemAction.defaultProps = {
diff --git a/components/list/ListItemContent.jsx b/components/list/ListItemContent.jsx
index 22e0b517..da9c0504 100644
--- a/components/list/ListItemContent.jsx
+++ b/components/list/ListItemContent.jsx
@@ -16,7 +16,7 @@ class ListItemContent extends React.Component {
const {type, children, caption, legend} = this.props;
let count = React.Children.count(children);
- [caption, legend].forEach(s => count += s ? 1 : 0);
+ [caption, legend].forEach(s => { count += s ? 1 : 0; });
const typeIndex = Math.min(count, types.length);
return type || types[typeIndex];
diff --git a/components/menu/Menu.jsx b/components/menu/Menu.jsx
index b0dfbaf6..992ac4a2 100644
--- a/components/menu/Menu.jsx
+++ b/components/menu/Menu.jsx
@@ -125,7 +125,7 @@ class Menu extends React.Component {
} else if (position === POSITION.BOTTOM_LEFT) {
return { clip: `rect(${height}px 0 ${height}px 0)` };
} else if (position === POSITION.TOP_LEFT) {
- return { clip: `rect(0 0 0 0)` };
+ return { clip: 'rect(0 0 0 0)' };
}
}
}
diff --git a/components/radio/Radio.jsx b/components/radio/Radio.jsx
index 2f657571..872dc742 100644
--- a/components/radio/Radio.jsx
+++ b/components/radio/Radio.jsx
@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { PropTypes } from 'react';
import Ripple from '../ripple';
import style from './style';
@@ -7,6 +7,12 @@ const Radio = ({checked, children, onMouseDown}) => {
return {children}
;
};
+Radio.propTypes = {
+ checked: PropTypes.bool,
+ children: PropTypes.any,
+ onMouseDown: PropTypes.func
+};
+
export default Ripple({
className: style.ripple,
spread: 2.6,
diff --git a/components/radio/RadioButton.jsx b/components/radio/RadioButton.jsx
index 31bc6ad7..ca7eefe5 100644
--- a/components/radio/RadioButton.jsx
+++ b/components/radio/RadioButton.jsx
@@ -38,7 +38,7 @@ class RadioButton extends React.Component {
render () {
const className = ClassNames(style[this.props.disabled ? 'disabled' : 'field'], this.props.className);
- const { onChange, ...others } = this.props;
+ const { onChange, ...others } = this.props; //eslint-disable-line no-unused-vars
return (