|
| 1 | +{ |
| 2 | + "extends": ["plugin:react/recommended", "plugin:import/errors", "plugin:import/warnings"], |
| 3 | + "parser": "babel-eslint", |
| 4 | + "parserOptions": { |
| 5 | + "ecmaVersion": 6, |
| 6 | + "sourceType": "module", |
| 7 | + "ecmaFeatures": { |
| 8 | + "jsx": true, |
| 9 | + "experimentalObjectRestSpread": true |
| 10 | + } |
| 11 | + }, |
| 12 | + "env": { |
| 13 | + "browser": true, |
| 14 | + "node": true, |
| 15 | + "commonjs": true, |
| 16 | + "es6": true |
| 17 | + }, |
| 18 | + "rules": { |
| 19 | + "no-cond-assign": [2, "except-parens"], |
| 20 | + "no-console": 2, |
| 21 | + "no-constant-condition": 2, |
| 22 | + "no-control-regex": 2, |
| 23 | + "no-debugger": 2, |
| 24 | + "no-dupe-args": 2, |
| 25 | + "no-dupe-keys": 2, |
| 26 | + "no-duplicate-case": 2, |
| 27 | + "no-empty-character-class": 2, |
| 28 | + "no-empty": 2, |
| 29 | + "no-ex-assign": 2, |
| 30 | + "no-extra-boolean-cast": 2, |
| 31 | + "no-extra-parens": 0, |
| 32 | + "no-extra-semi": 2, |
| 33 | + "no-func-assign": 2, |
| 34 | + "no-inner-declarations": 2, |
| 35 | + "no-invalid-regexp": 2, |
| 36 | + "no-irregular-whitespace": 2, |
| 37 | + "no-obj-calls": 2, |
| 38 | + "no-prototype-builtins": 0, |
| 39 | + "no-regex-spaces": 2, |
| 40 | + "no-sparse-arrays": 2, |
| 41 | + "no-template-curly-in-string": 2, |
| 42 | + "no-unexpected-multiline": 2, |
| 43 | + "no-unreachable": 2, |
| 44 | + "no-unsafe-finally": 2, |
| 45 | + "no-unsafe-negation": 2, |
| 46 | + "use-isnan": 2, |
| 47 | + "valid-jsdoc": [2, { "requireReturn": false, "requireReturnType": true, "requireParamDescription": false, "requireReturnDescription": false }], |
| 48 | + "valid-typeof": 2, |
| 49 | + |
| 50 | + // Best Practices |
| 51 | + "accessor-pairs": 2, |
| 52 | + "array-callback-return": 2, |
| 53 | + "block-scoped-var": 2, |
| 54 | + "class-methods-use-this": 0, |
| 55 | + "complexity": 0, |
| 56 | + "consistent-return": 2, |
| 57 | + "curly": 2, |
| 58 | + "default-case": 2, |
| 59 | + "dot-location": [2, "property"], |
| 60 | + "dot-notation": 2, |
| 61 | + "eqeqeq": [2, "always", { "null": "ignore" }], |
| 62 | + "guard-for-in": 0, |
| 63 | + "no-alert": 2, |
| 64 | + "no-caller": 2, |
| 65 | + "no-case-declarations": 2, |
| 66 | + "no-div-regex": 2, |
| 67 | + "no-else-return": 2, |
| 68 | + "no-empty-function": [2, { "allow": ["arrowFunctions", "constructors", "methods"] }], |
| 69 | + "no-empty-pattern": 2, |
| 70 | + "no-eq-null": "warn", |
| 71 | + "no-eval": 2, |
| 72 | + "no-extend-native": 2, |
| 73 | + "no-extra-bind": 2, |
| 74 | + "no-extra-label": 2, |
| 75 | + "no-fallthrough": 2, |
| 76 | + "no-floating-decimal": 2, |
| 77 | + "no-global-assign": 2, |
| 78 | + "no-implicit-coercion": [2, { "boolean": false, "number": true, "string": true, "allow": [] }], |
| 79 | + "no-implicit-globals": 2, |
| 80 | + "no-implied-eval": 2, |
| 81 | + "no-invalid-this": "warn", |
| 82 | + "no-iterator": 2, |
| 83 | + "no-labels": 2, |
| 84 | + "no-lone-blocks": 2, |
| 85 | + "no-loop-func": 2, |
| 86 | + "no-magic-numbers": 0, |
| 87 | + "no-multi-spaces": [2, { "exceptions": { "Property": true, "VariableDeclarator": true, "ImportDeclaration": true, "Property": true } }], |
| 88 | + "no-multi-str": 2, |
| 89 | + "no-new": 2, |
| 90 | + "no-new-func": 2, |
| 91 | + "no-new-wrappers": 2, |
| 92 | + "no-octal": 2, |
| 93 | + "no-octal-escape": 2, |
| 94 | + "no-param-reassign": [2, { "props": false }], |
| 95 | + "no-proto": 2, |
| 96 | + "no-redeclare": 2, |
| 97 | + "no-return-assign": 2, |
| 98 | + "no-script-url": 2, |
| 99 | + "no-self-assign": 2, |
| 100 | + "no-self-compare": 2, |
| 101 | + "no-sequences": 2, |
| 102 | + "no-throw-literal": 2, |
| 103 | + "no-unmodified-loop-condition": "warn", |
| 104 | + "no-unused-expressions": [2, { "allowShortCircuit": true, "allowTernary": true }], |
| 105 | + "no-unused-labels": 2, |
| 106 | + "no-useless-call": 2, |
| 107 | + "no-useless-concat": 2, |
| 108 | + "no-useless-escape": 2, |
| 109 | + "no-useless-return": 2, |
| 110 | + "no-void": 2, |
| 111 | + "no-warning-comments": 0, |
| 112 | + "no-with": 2, |
| 113 | + "radix": 2, |
| 114 | + "vars-on-top": 0, |
| 115 | + "wrap-iife": [2, "inside"], |
| 116 | + "yoda": 2, |
| 117 | + |
| 118 | + // Strict Mode |
| 119 | + "strict": [2, "global"], |
| 120 | + |
| 121 | + // Variables |
| 122 | + "init-declarations": 0, |
| 123 | + "no-catch-shadow": 2, |
| 124 | + "no-delete-var": 2, |
| 125 | + "no-label-var": 2, |
| 126 | + "no-restricted-globals": 2, |
| 127 | + "no-shadow": 0, |
| 128 | + "no-shadow-restricted-names": 2, |
| 129 | + "no-undef": 2, |
| 130 | + "no-undef-init": 2, |
| 131 | + "no-undefined": 0, |
| 132 | + "no-unused-vars": 1, |
| 133 | + "no-use-before-define": [2, "nofunc"], |
| 134 | + |
| 135 | + // Node.js and CommonJS |
| 136 | + "callback-return": 0, |
| 137 | + "global-require": 2, |
| 138 | + "handle-callback-err": 2, |
| 139 | + "no-mixed-requires": 2, |
| 140 | + "no-new-require": 2, |
| 141 | + "no-path-concat": 2, |
| 142 | + "no-process-env": 0, |
| 143 | + "no-process-exit": 0, |
| 144 | + "no-restricted-modules": 0, |
| 145 | + "no-sync": 0, |
| 146 | + |
| 147 | + // Stylistic Issues |
| 148 | + "array-bracket-spacing": [2, "never"], |
| 149 | + "block-spacing": [2, "always"], |
| 150 | + "brace-style": [2, "1tbs", { "allowSingleLine": true }], |
| 151 | + "camelcase": [2, { "properties": "always" }], |
| 152 | + "comma-dangle": 0, |
| 153 | + "comma-spacing": [2, { "before": false, "after": true }], |
| 154 | + "comma-style": [2, "last"], |
| 155 | + "computed-property-spacing": [2, "never"], |
| 156 | + "consistent-this": [0, "self"], |
| 157 | + "eol-last": [2, "always"], |
| 158 | + "func-call-spacing": [2, "never"], |
| 159 | + "func-name-matching": 2, |
| 160 | + "func-names": 0, |
| 161 | + "func-style": [2, "declaration", { "allowArrowFunctions": true }], |
| 162 | + "id-blacklist": 0, |
| 163 | + "id-length": 0, |
| 164 | + "id-match": 0, |
| 165 | + "indent": [2, 2, { "SwitchCase": 1, "VariableDeclarator": { "var": 2, "let": 2, "const": 3 }, "FunctionDeclaration": {"parameters": "first"}, "CallExpression": {"arguments": "first"}, "FunctionExpression": {"parameters": "first"} }], |
| 166 | + "jsx-quotes": [2, "prefer-single"], |
| 167 | + "key-spacing": [2, { "beforeColon": false, "afterColon": true, "mode": "minimum" }], |
| 168 | + "keyword-spacing": [2, { "before": true, "after": true }], |
| 169 | + "line-comment-position": [1, { "position": "above" }], |
| 170 | + "linebreak-style": [2, "unix"], |
| 171 | + "lines-around-comment": 2, |
| 172 | + "max-depth": [2, 6], |
| 173 | + "max-len": [2, { "code": 125, "tabWidth": 4 }], |
| 174 | + "max-lines": 0, |
| 175 | + "max-nested-callbacks": [2, { "max": 5 }], |
| 176 | + "max-params": [1, { "max": 10 }], |
| 177 | + "max-statements": 0, |
| 178 | + "max-statements-per-line": [2, { "max": 2 }], |
| 179 | + "multiline-ternary": 0, |
| 180 | + "new-cap": [2, { "newIsCap": true, "capIsNew": false, "properties": false }], |
| 181 | + "new-parens": 2, |
| 182 | + "newline-after-var": [2, "always"], |
| 183 | + "newline-before-return": 2, |
| 184 | + "newline-per-chained-call": [2, { "ignoreChainWithDepth": 4 }], |
| 185 | + "no-array-constructor": 2, |
| 186 | + "no-bitwise": 0, |
| 187 | + "no-continue": 0, |
| 188 | + "no-inline-comments": 0, |
| 189 | + "no-lonely-if": 2, |
| 190 | + "no-mixed-operators": [2, { "allowSamePrecedence": true }], |
| 191 | + "no-mixed-spaces-and-tabs": 2, |
| 192 | + "no-multiple-empty-lines": [2, { "max": 1, "maxEOF": 1, "maxBOF": 0 }], |
| 193 | + "no-negated-condition": 0, |
| 194 | + "no-nested-ternary": 2, |
| 195 | + "no-new-object": 2, |
| 196 | + "no-plusplus": 0, |
| 197 | + "no-restricted-syntax": [2, "DebuggerStatement", "EmptyStatement", "LabeledStatement", "WithStatement"], |
| 198 | + "no-ternary": 0, |
| 199 | + "no-trailing-spaces": 1, |
| 200 | + "no-underscore-dangle": 0, |
| 201 | + "no-unneeded-ternary": 2, |
| 202 | + "no-whitespace-before-property": 2, |
| 203 | + "object-curly-newline": 0, |
| 204 | + "object-curly-spacing": [2, "always"], |
| 205 | + "object-property-newline": 0, |
| 206 | + "one-var": [2, { "initialized": "never", "uninitialized": "always" }], |
| 207 | + "one-var-declaration-per-line": [2, "always"], |
| 208 | + "operator-assignment": 0, |
| 209 | + "operator-linebreak": [2, "before"], |
| 210 | + "padded-blocks": [0, "never"], |
| 211 | + "quote-props": [2, "as-needed"], |
| 212 | + "quotes": [2, "single", { "allowTemplateLiterals": true }], |
| 213 | + "require-jsdoc": [0, { "require": { "FunctionDeclaration": false, "ClassDeclaration": true, "MethodDefinition": true } }], |
| 214 | + "semi": [2, "always"], |
| 215 | + "semi-spacing": [2, { "before": false, "after": true }], |
| 216 | + "sort-keys": 0, |
| 217 | + "sort-vars": 0, |
| 218 | + "space-before-blocks": [2, "always"], |
| 219 | + "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], |
| 220 | + "space-in-parens": [2, "never"], |
| 221 | + "space-infix-ops": 2, |
| 222 | + "space-unary-ops": [2, { "words": true, "nonwords": false }], |
| 223 | + "spaced-comment": [2, "always", { "markers": ["!"] }], |
| 224 | + "unicode-bom": [2, "never"], |
| 225 | + "wrap-regex": 2, |
| 226 | + |
| 227 | + // ECMAScript 6 |
| 228 | + "arrow-body-style": [2, "as-needed"], |
| 229 | + "arrow-parens": [2, "as-needed"], |
| 230 | + "arrow-spacing": [2, { "before": true, "after": true }], |
| 231 | + "constructor-super": 2, |
| 232 | + "generator-star-spacing": [2, {"before": true, "after": false}], |
| 233 | + "no-class-assign": 2, |
| 234 | + "no-confusing-arrow": [2, { "allowParens": true }], |
| 235 | + "no-const-assign": 2, |
| 236 | + "no-dupe-class-members": 2, |
| 237 | + "no-duplicate-imports": 2, |
| 238 | + "no-new-symbol": 2, |
| 239 | + "no-restricted-imports": 0, |
| 240 | + "no-return-await": 2, |
| 241 | + "no-this-before-super": 2, |
| 242 | + "no-useless-computed-key": 2, |
| 243 | + "no-useless-constructor": 2, |
| 244 | + "no-useless-rename": 2, |
| 245 | + "no-var": 2, |
| 246 | + "object-shorthand": 2, |
| 247 | + "prefer-arrow-callback": 0, |
| 248 | + "prefer-const": 2, |
| 249 | + "prefer-numeric-literals": 2, |
| 250 | + "prefer-rest-params": 0, |
| 251 | + "prefer-spread": 2, |
| 252 | + "prefer-template": 2, |
| 253 | + "require-yield": 2, |
| 254 | + "rest-spread-spacing": [2, "never"], |
| 255 | + "sort-imports": 0, |
| 256 | + "symbol-description": 2, |
| 257 | + "template-curly-spacing": [2, "never"], |
| 258 | + "yield-star-spacing": [2, "before"], |
| 259 | + |
| 260 | + // plugin: import |
| 261 | + "import/no-unresolved": [2, { "commonjs": true }] |
| 262 | + }, |
| 263 | + "settings": { |
| 264 | + "import/resolver": "webpack" |
| 265 | + } |
| 266 | +} |
0 commit comments