diff --git a/babel.js b/babel.js index 77ee994..5227efd 100644 --- a/babel.js +++ b/babel.js @@ -4,22 +4,14 @@ module.exports = { "plugins": ["babel"], "rules": { // Re-implemented eslint rules - "babel/generator-star-spacing": [2], "babel/new-cap": [2], - "babel/array-bracket-spacing": [2], "babel/object-curly-spacing": [2], - "babel/object-shorthand": [0], - "babel/arrow-parens": [2, "as-needed"], + "babel/no-invalid-this": [2], + "babel/semi": [2], // Corresponding eslint rules (they're turned off to prevent conflicts) - "generator-star-spacing": [0], "new-cap": [0], - "array-bracket-spacing": [0], + "no-invalid-this": [0], "object-curly-spacing": [0], - "object-shorthand": [0], - "arrow-parens": [0], - // babel only rules - "babel/no-await-in-loop": [2], - "babel/flow-object-type": [0], - "babel/func-params-comma-dangle": [2] + "semi": [0] } }; diff --git a/index.js b/index.js index 5c2ea25..2825d0a 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,8 @@ module.exports = { }, "rules": { // Possible errors + "no-await-in-loop": [2], + "no-compare-neg-zero": [2], "no-cond-assign": [2], "no-console": [0], "no-constant-condition": [2], @@ -17,8 +19,8 @@ module.exports = { "no-dupe-args": [2], "no-dupe-keys": [2], "no-duplicate-case": [2], - "no-empty-character-class": [2], "no-empty": [2], + "no-empty-character-class": [2], "no-ex-assign": [2], "no-extra-boolean-cast": [2], "no-extra-parens": [0], @@ -78,15 +80,17 @@ module.exports = { "no-magic-numbers": [0], "no-multi-spaces": [2], "no-multi-str": [2], + "no-new": [2], "no-new-func": [2], "no-new-wrappers": [2], - "no-new": [2], "no-octal-escape": [2], "no-octal": [2], "no-param-reassign": [2], "no-proto": [2], "no-redeclare": [2], + "no-restricted-properties": [0], "no-return-assign": [2], + "no-return-await": [2], "no-script-url": [2], "no-self-assign": [2], "no-self-compare": [2], @@ -101,7 +105,9 @@ module.exports = { "no-void": [2], "no-warning-comments": [0], "no-with": [2], + "prefer-promise-reject-errors": [2], "radix": [2], + "require-await": [2], "vars-on-top": [0], "wrap-iife": [2, "inside"], "yoda": [2], @@ -113,10 +119,10 @@ module.exports = { "no-delete-var": [2], "no-label-var": [2], "no-restricted-globals": [2], - "no-shadow-restricted-names": [2], "no-shadow": [2], - "no-undef-init": [0], + "no-shadow-restricted-names": [2], "no-undef": [2], + "no-undef-init": [0], "no-undefined": [0], "no-unused-vars": [2], "no-use-before-define": [2], @@ -130,13 +136,13 @@ module.exports = { "no-process-env": [0], "no-process-exit": [0], "no-restricted-modules": [0], - "no-restricted-properties": [0], "no-sync": [0], // Stylistic issues "array-bracket-spacing": [2], "block-spacing": [0], "brace-style": [2], "camelcase": [2], + "capitalized-comments": [0], "comma-dangle": [2], "comma-spacing": [2], "comma-style": [2], @@ -144,6 +150,7 @@ module.exports = { "consistent-this": [2], "eol-last": [2], "func-call-spacing": [2], + "func-name-matching": [2], "func-names": [2], "func-style": [0], "id-blacklist": [0], @@ -162,8 +169,8 @@ module.exports = { "max-lines": [2], "max-nested-callbacks": [2], "max-params": [0], - "max-statements-per-line": [2], "max-statements": [0], + "max-statements-per-line": [2], "multiline-ternary": [0], "new-cap": [2], "new-parens": [2], @@ -177,6 +184,7 @@ module.exports = { "no-lonely-if": [2], "no-mixed-operators": [2], "no-mixed-spaces-and-tabs": [2], + "no-multi-assign": [2], "no-multiple-empty-lines": [2], "no-negated-condition": [0], "no-nested-ternary": [0], @@ -189,11 +197,12 @@ module.exports = { "no-underscore-dangle": [0], "no-unneeded-ternary": [2], "no-whitespace-before-property": [2], + "nonblock-statement-body-position": [2], "object-curly-newline": [0], "object-curly-spacing": [2], "object-property-newline": [2, { "allowMultiplePropertiesPerLine": true }], - "one-var-declaration-per-line": [2], "one-var": [2, "never"], + "one-var-declaration-per-line": [2], "operator-assignment": [2], "operator-linebreak": [2], "padded-blocks": [0], @@ -210,6 +219,7 @@ module.exports = { "space-infix-ops": [2], "space-unary-ops": [2], "spaced-comment": [2], + "template-tag-spacing": [2, "always"], "unicode-bom": [2], "wrap-regex": [0], // es6 @@ -233,8 +243,8 @@ module.exports = { "object-shorthand": [2, "consistent"], "prefer-arrow-callback": [2], "prefer-const": [2], + "prefer-destructuring": [0], "prefer-numeric-literals": [0], - "prefer-reflect": [0], "prefer-rest-params": [0], "prefer-spread": [0], "prefer-template": [2], diff --git a/package.json b/package.json index adc89bb..ca98304 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "url": "https://github.com/staticdeploy/eslint-config-staticdeploy/issues" }, "dependencies": { - "babel-eslint": "^7.0.0", - "eslint-plugin-babel": "^3.3.0", - "eslint-plugin-react": "^6.4.1" + "babel-eslint": "^7.2.3", + "eslint-plugin-babel": "^4.1.1", + "eslint-plugin-react": "^7.0.0" } } diff --git a/react.js b/react.js index b7bc942..c0c8014 100644 --- a/react.js +++ b/react.js @@ -5,7 +5,11 @@ module.exports = { // Base rules "react/display-name": [0], "react/forbid-component-props": [0], + "react/forbid-elements": [0], "react/forbid-prop-types": [0], + "react/forbid-foreign-prop-types": [2], + "react/no-array-index-key": [0], + "react/no-children-prop": [2], "react/no-danger": [0], "react/no-danger-with-children": [0], "react/no-deprecated": [2], @@ -18,18 +22,22 @@ module.exports = { "react/no-render-return-value": [2], "react/no-set-state": [0], "react/no-string-refs": [2], + "react/no-unescaped-entities": [2], "react/no-unknown-property": [2], - "react/no-unused-prop-types": [0], + "react/no-unused-prop-types": [2], + "react/no-will-update-set-state": [2], "react/prefer-es6-class": [2], "react/prefer-stateless-function": [0], "react/prop-types": [2], "react/react-in-jsx-scope": [2], + "react/require-default-props": [0], "react/require-optimization": [0], "react/require-render-return": [2], "react/self-closing-comp": [2], "react/sort-comp": [2], "react/sort-prop-types": [2], "react/style-prop-object": [2], + "react/void-dom-elements-no-children": [2], // JSX specific rules "react/jsx-boolean-value": [2, "always"], "react/jsx-closing-bracket-location": [2], @@ -50,7 +58,7 @@ module.exports = { "react/jsx-no-undef": [2], "react/jsx-pascal-case": [2], "react/jsx-sort-props": [2], - "react/jsx-space-before-closing": [2, "always"], + "react/jsx-tag-spacing": [2], "react/jsx-uses-react": [2], "react/jsx-uses-vars": [2], "react/jsx-wrap-multilines": [2]