mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-15 09:49:01 +05:30
203 lines
6.1 KiB
JSON
203 lines
6.1 KiB
JSON
{
|
|
"parser": "babel-eslint",
|
|
"plugins": [
|
|
"react"
|
|
],
|
|
|
|
"ecmaFeatures": {
|
|
"jsx": true,
|
|
"modules": true,
|
|
"classes": true,
|
|
"defaultParams": true,
|
|
"destructuring": true,
|
|
"spread": true,
|
|
"arrowFunctions": true,
|
|
"blockBindings": true,
|
|
"objectLiteralComputedProperties": true,
|
|
"objectLiteralDuplicateProperties": true,
|
|
"objectLiteralShorthandMethods": true,
|
|
"objectLiteralShorthandProperties": true,
|
|
"restParams": true,
|
|
"superInFunctions": true,
|
|
"templateStrings": true,
|
|
"experimentalObjectRestSpread": true
|
|
},
|
|
|
|
"env": {
|
|
"browser": true,
|
|
"es6": true
|
|
},
|
|
|
|
"extends": "eslint:recommended",
|
|
|
|
// @see: http://eslint.org/docs/rules/
|
|
"rules": {
|
|
// possible errors (including eslint:recommended)
|
|
"valid-jsdoc": [1, {"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,
|
|
|
|
// strict mode
|
|
"strict": [1, "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"],
|
|
|
|
// CommonJS
|
|
"no-mixed-requires": 1,
|
|
"no-path-concat": 1,
|
|
|
|
// 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,
|
|
|
|
// 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,
|
|
|
|
// 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
|
|
}
|
|
}
|