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