diff --git a/.eslintrc b/.eslintrc index d666b5f9..45eab0f8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,28 +7,36 @@ "__DEV__": false }, "parser": "babel-eslint", - "plugins": [ - "react", - "prettier" - ], + "plugins": ["react", "prettier"], "rules": { "max-len": "off", "no-plusplus": "off", "prefer-const": "off", "one-var": "off", "no-param-reassign": "off", - "no-mixed-operators": ["error", { - "groups": [ - ["&", "|", "^", "~", "<<", ">>", ">>>"], - ["==", "!=", "===", "!==", ">", ">=", "<", "<="], - ["&&", "||"], - ["in", "instanceof"] - ], - "allowSamePrecedence": false - }], + "no-mixed-operators": [ + "error", + { + "groups": [ + ["&", "|", "^", "~", "<<", ">>", ">>>"], + ["==", "!=", "===", "!==", ">", ">=", "<", "<="], + ["&&", "||"], + ["in", "instanceof"] + ], + "allowSamePrecedence": false + } + ], "class-methods-use-this": "off", "no-underscore-dangle": "off", + "prefer-destructuring": "off", "jsx-a11y/no-noninteractive-element-interactions": "off", + "jsx-a11y/anchor-is-valid": "off", + "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/mouse-events-have-key-events": "off", + "jsx-a11y/label-has-for": [ + "error", + { "required": { "some": ["nesting", "id"] } } + ], "react/forbid-prop-types": "off", "react/jsx-boolean-value": 2, "react/jsx-no-duplicate-props": 2, @@ -36,23 +44,33 @@ "react/no-array-index-key": "off", "react/no-string-refs": "off", "react/prefer-stateless-function": "off", - "react/jsx-filename-extension": ["error", { - "extensions": [".js"] - }], - "react/prop-types": [2, { "ignore": [ - "children", - "className", - "style", - "bsStyle", - "bsClass", - "bsSize" - ] - }], + "react/default-props-match-prop-types": "off", + "react/jsx-filename-extension": [ + "error", + { + "extensions": [".js"] + } + ], + "react/prop-types": [ + 2, + { + "ignore": [ + "children", + "className", + "style", + "bsStyle", + "bsClass", + "bsSize" + ] + } + ], "react/require-default-props": "off", "import/no-extraneous-dependencies": [ - "error", {"devDependencies": ["!src/**/*.js"] } + "error", + { "devDependencies": ["!src/**/*.js"] } ], - "no-restricted-syntax": ["error", + "no-restricted-syntax": [ + "error", "ForOfStatement", "LabeledStatement", "WithStatement" diff --git a/package.json b/package.json index 1d912684..ca594972 100644 --- a/package.json +++ b/package.json @@ -79,30 +79,30 @@ "cross-env": "^2.0.0", "enzyme": "^3.1.0", "eslint": "^4.19.1", - "eslint-config-airbnb": "^15.1.0", + "eslint-config-airbnb": "^16.1.0", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-import": "^2.10.0", - "eslint-plugin-jsx-a11y": "^5.1.1", - "eslint-plugin-mocha": "^4.12.1", + "eslint-plugin-import": "^2.12.0", + "eslint-plugin-jsx-a11y": "^6.0.3", + "eslint-plugin-mocha": "^5.0.0", "eslint-plugin-prettier": "^2.6.0", - "eslint-plugin-react": "^7.7.0", + "eslint-plugin-react": "^7.8.2", "execa": "^0.10.0", - "fs-extra": "^5.0.0", + "fs-extra": "^6.0.1", "husky": "^0.14.3", - "karma": "^2.0.0", + "karma": "^2.0.2", "karma-chrome-launcher": "^2.2.0", "karma-cli": "^1.0.1", - "karma-coverage": "^1.1.0", + "karma-coverage": "^1.1.2", "karma-firefox-launcher": "^1.0.0", "karma-mocha": "^1.1.1", "karma-mocha-reporter": "^2.0.4", - "karma-sinon-chai": "^1.2.2", + "karma-sinon-chai": "^1.3.4", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^3.0.0", - "lint-staged": "^6.0.0", - "lodash": "^4.17.5", - "mocha": "^5.0.5", - "prettier": "^1.11.1", + "lint-staged": "^7.1.1", + "lodash": "^4.17.10", + "mocha": "^5.2.0", + "prettier": "^1.12.1", "react": "^15.5.4", "react-dom": "^15.5.4", "react-test-renderer": "^15.6.2", diff --git a/test/BadgeSpec.js b/test/BadgeSpec.js index 26fc317d..9ed5f1d1 100644 --- a/test/BadgeSpec.js +++ b/test/BadgeSpec.js @@ -47,7 +47,7 @@ describe('', () => { }); it('should hide with empty string', () => { - let instance = ReactTestUtils.renderIntoDocument({''}); + let instance = ReactTestUtils.renderIntoDocument(); assert.ok(ReactDOM.findDOMNode(instance).className.match(/\bhidden\b/)); }); diff --git a/test/NavSpec.js b/test/NavSpec.js index bc36c332..46a192df 100644 --- a/test/NavSpec.js +++ b/test/NavSpec.js @@ -265,10 +265,10 @@ describe('