Update eslint config according to 2.0 changes

This commit is contained in:
SleepWalker 2016-06-02 19:30:51 +03:00
parent e93488de2c
commit 3478c25342

View File

@ -33,170 +33,169 @@
// @see: http://eslint.org/docs/rules/
"rules": {
// possible errors (including eslint:recommended)
"valid-jsdoc": [1, {"requireParamDescription": false, "requireReturnDescription": false}],
"valid-jsdoc": ["warn", {"requireParamDescription": false, "requireReturnDescription": false}],
// best practice
"block-scoped-var": 2,
"curly": 2,
"default-case": 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"eqeqeq": [2, "smart"],
"no-alert": 2,
"no-caller": 2,
"no-case-declarations": 2,
"no-div-regex": 2,
"no-else-return": 2,
"no-empty-pattern": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 1,
"no-fallthrough": 2,
"no-floating-decimal": 1,
"no-implied-eval": 2,
"no-invalid-this": 0,
"no-labels": 2,
"no-lone-blocks": 1,
"no-loop-func": 2,
"no-magic-numbers": 1,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new-wrappers": 1,
"no-new": 1,
"no-octal-escape": 1,
"no-octal": 2,
"no-proto": 2,
"no-redeclare": 1,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": [1, {"allowShortCircuit": true, "allowTernary": true}],
"no-useless-call": 1,
"no-useless-concat": 1,
"no-void": 2,
"no-with": 2,
"radix": 2,
"wrap-iife": 2,
"yoda": 1,
"block-scoped-var": "error",
"curly": "error",
"default-case": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": ["error", "smart"],
"no-alert": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-empty-pattern": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "warn",
"no-fallthrough": "error",
"no-floating-decimal": "warn",
"no-implied-eval": "error",
"no-invalid-this": "off",
"no-labels": "error",
"no-lone-blocks": "warn",
"no-loop-func": "error",
"no-magic-numbers": "warn",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-native-reassign": "error",
"no-new-wrappers": "warn",
"no-new": "warn",
"no-octal-escape": "warn",
"no-octal": "error",
"no-proto": "error",
"no-redeclare": "warn",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unused-expressions": ["warn", {"allowShortCircuit": true, "allowTernary": true}],
"no-useless-call": "warn",
"no-useless-concat": "warn",
"no-void": "error",
"no-with": "error",
"radix": "error",
"wrap-iife": "error",
"yoda": "warn",
"no-constant-condition": "error",
// strict mode
"strict": [1, "never"], // babel все сделает за нас
"strict": ["warn", "never"], // babel все сделает за нас
// variables
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow-restricted-names": 2,
"no-shadow": 0,
"no-undef-init": 1,
"no-undef": 2,
"no-undefined": 2,
"no-use-before-define": [1, "nofunc"],
"no-catch-shadow": "error",
"no-delete-var": "error",
"no-label-var": "error",
"no-shadow-restricted-names": "error",
"no-shadow": "off",
"no-undef-init": "warn",
"no-undef": "error",
"no-undefined": "error",
"no-use-before-define": ["warn", "nofunc"],
// CommonJS
"no-mixed-requires": 1,
"no-path-concat": 1,
"no-mixed-requires": "warn",
"no-path-concat": "warn",
// stylistic
"array-bracket-spacing": 2,
"block-spacing": [2, "never"],
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"comma-spacing": 2,
"comma-style": 2,
"computed-property-spacing": 2,
"consistent-this": [2, "that"],
"camelcase": 1,
"eol-last": 1,
"id-length": [2, {"min": 2, "exceptions": ["x", "y", "i", "$"]}],
"indent": [2, 4, {"SwitchCase": 1}],
"jsx-quotes": 2,
"key-spacing": [2, {"mode": "minimum"}],
"linebreak-style": 2,
"max-depth": 2,
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 1,
"no-bitwise": 1,
"no-lonely-if": 2,
"no-negated-condition": 1,
"no-nested-ternary": 2,
"no-new-object": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 1,
"no-unneeded-ternary": 1,
"one-var": [2, "never"],
"operator-assignment": [1, "always"],
"operator-linebreak": [2, "before"],
"padded-blocks": [1, "never"],
"quote-props": [1, "as-needed"],
"quotes": [1, "single"],
"semi": 2,
"semi-spacing": 2,
"space-after-keywords": 2,
"space-before-keywords": 2,
"space-before-blocks": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": 1,
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
"spaced-comment": 1,
"array-bracket-spacing": "error",
"block-spacing": ["error", "never"],
"brace-style": ["error", "1tbs", {"allowSingleLine": true}],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": ["error", "that"],
"camelcase": "warn",
"eol-last": "warn",
"id-length": ["error", {"min": "error", "exceptions": ["x", "y", "i", "$"]}],
"indent": ["error", 4, {"SwitchCase": 1}],
"jsx-quotes": "error",
"key-spacing": ["error", {"mode": "minimum"}],
"linebreak-style": "error",
"max-depth": "error",
"new-cap": "error",
"new-parens": "error",
"no-array-constructor": "warn",
"no-bitwise": "warn",
"no-lonely-if": "error",
"no-negated-condition": "warn",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "warn",
"no-unneeded-ternary": "warn",
"one-var": ["error", "never"],
"operator-assignment": ["warn", "always"],
"operator-linebreak": ["error", "before"],
"padded-blocks": ["warn", "never"],
"quote-props": ["warn", "as-needed"],
"quotes": ["warn", "single"],
"semi": "error",
"semi-spacing": "error",
"space-after-keywords": "error",
"keyword-spacing": "warn",
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"space-in-parens": "warn",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "warn",
// es6
"arrow-body-style": 1,
"arrow-parens": 2,
"arrow-spacing": 2,
"constructor-super": 2,
"generator-star-spacing": 1,
"no-arrow-condition": 1,
"no-class-assign": 2,
"no-const-assign": 2,
"no-dupe-class-members": 2,
"no-this-before-super": 2,
"no-var": 1,
"object-shorthand": 1,
"prefer-arrow-callback": 1,
"prefer-const": 1,
"prefer-reflect": 1,
"prefer-spread": 1,
"prefer-template": 1,
"require-yield": 2,
"arrow-body-style": "warn",
"arrow-parens": "error",
"arrow-spacing": "error",
"constructor-super": "error",
"generator-star-spacing": "warn",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-this-before-super": "error",
"no-var": "warn",
"object-shorthand": "warn",
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-reflect": "warn",
"prefer-spread": "warn",
"prefer-template": "warn",
"require-yield": "error",
// react
"react/display-name": 1,
"react/forbid-prop-types": 1,
"react/jsx-boolean-value": 1,
"react/jsx-closing-bracket-location": 1,
"react/jsx-curly-spacing": 1,
"react/jsx-handler-names": [1, {"eventHandlerPrefix": "on", "eventHandlerPropPrefix": "on"}],
"react/jsx-indent-props": 1,
"react/jsx-key": 1,
"react/jsx-max-props-per-line": [1, {"maximum": 3}],
"react/jsx-no-bind": 1,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-literals": 1,
"react/jsx-no-undef": 1,
"react/jsx-pascal-case": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-danger": 1,
"react/no-deprecated": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 1,
"react/no-is-mounted": 1,
"react/no-multi-comp": 1,
"react/no-string-refs": 1,
"react/no-unknown-property": 1,
"react/prefer-es6-class": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/require-extension": 1,
"react/self-closing-comp": 1,
"react/sort-comp": [1, {"order": ["lifecycle", "render", "everything-else"]}],
"react/wrap-multilines": 1
"react/display-name": "warn",
"react/forbid-prop-types": "warn",
"react/jsx-boolean-value": "warn",
"react/jsx-closing-bracket-location": "warn",
"react/jsx-curly-spacing": "warn",
"react/jsx-handler-names": ["warn", {"eventHandlerPrefix": "on", "eventHandlerPropPrefix": "on"}],
"react/jsx-indent-props": "warn",
"react/jsx-key": "warn",
"react/jsx-max-props-per-line": ["warn", {"maximum": 3}],
"react/jsx-no-bind": "warn",
"react/jsx-no-duplicate-props": "warn",
"react/jsx-no-literals": "warn",
"react/jsx-no-undef": "warn",
"react/jsx-pascal-case": "warn",
"react/jsx-uses-react": "warn",
"react/jsx-uses-vars": "warn",
"react/no-danger": "warn",
"react/no-deprecated": "warn",
"react/no-did-mount-set-state": "warn",
"react/no-did-update-set-state": "warn",
"react/no-direct-mutation-state": "warn",
"react/no-is-mounted": "warn",
"react/no-multi-comp": "warn",
"react/no-string-refs": "warn",
"react/no-unknown-property": "warn",
"react/prefer-es6-class": "warn",
"react/prop-types": "warn",
"react/react-in-jsx-scope": "warn",
"react/require-extension": "warn",
"react/self-closing-comp": "warn",
"react/sort-comp": ["warn", {"order": ["lifecycle", "render", "everything-else"]}],
"react/wrap-multilines": "warn"
}
}