|
| 1 | +{ |
| 2 | + "extends": ["eslint:recommended", "plugin:flowtype/recommended", "plugin:import/errors", "plugin:import/warnings"], |
| 3 | + "env": { |
| 4 | + "browser": true, |
| 5 | + "es6": true, |
| 6 | + "jest": true, |
| 7 | + "commonjs": true |
| 8 | + }, |
| 9 | + "plugins": ["flowtype", "import"], |
| 10 | + "parser": "babel-eslint", |
| 11 | + "parserOptions": { |
| 12 | + "ecmaVersion": 8, |
| 13 | + "sourceType": "module", |
| 14 | + "ecmaFeatures": { |
| 15 | + "jsx": true |
| 16 | + } |
| 17 | + }, |
| 18 | + "rules": { |
| 19 | + "accessor-pairs": "error", |
| 20 | + "array-bracket-newline": [ |
| 21 | + "error", |
| 22 | + { |
| 23 | + "minItems": 2, |
| 24 | + "multiline": true |
| 25 | + } |
| 26 | + ], |
| 27 | + "array-bracket-spacing": ["warn", "always"], |
| 28 | + "array-callback-return": "error", |
| 29 | + "array-element-newline": [ |
| 30 | + "warn", |
| 31 | + { |
| 32 | + "minItems": 2, |
| 33 | + "multiline": true |
| 34 | + } |
| 35 | + ], |
| 36 | + "arrow-body-style": ["error", "as-needed"], |
| 37 | + "arrow-parens": ["warn", "as-needed"], |
| 38 | + "arrow-spacing": "error", |
| 39 | + "block-spacing": "error", |
| 40 | + "brace-style": "warn", |
| 41 | + "camelcase": "error", |
| 42 | + "comma-dangle": ["warn", "always"], |
| 43 | + "comma-spacing": "warn", |
| 44 | + "comma-style": "error", |
| 45 | + "computed-property-spacing": "error", |
| 46 | + "constructor-super": "error", |
| 47 | + "curly": ["warn", "multi-or-nest"], |
| 48 | + "dot-location": ["error", "property"], |
| 49 | + "dot-notation": "error", |
| 50 | + "eol-last": "error", |
| 51 | + "eqeqeq": "error", |
| 52 | + "func-call-spacing": "warn", |
| 53 | + "func-names": ["error", "as-needed"], |
| 54 | + "func-style": [ |
| 55 | + "error", |
| 56 | + "declaration", |
| 57 | + { |
| 58 | + "allowArrowFunctions": true |
| 59 | + } |
| 60 | + ], |
| 61 | + "function-paren-newline": [ |
| 62 | + "warn", |
| 63 | + { |
| 64 | + "minItems": 4 |
| 65 | + } |
| 66 | + ], |
| 67 | + "import/no-duplicates": "error", |
| 68 | + "import/extensions": [ |
| 69 | + "error", |
| 70 | + "always", |
| 71 | + { |
| 72 | + "js": "never", |
| 73 | + "jsx": "never" |
| 74 | + } |
| 75 | + ], |
| 76 | + "indent": [ |
| 77 | + "warn", |
| 78 | + 2, |
| 79 | + { |
| 80 | + "FunctionDeclaration": { |
| 81 | + "parameters": "first" |
| 82 | + }, |
| 83 | + "FunctionExpression": { |
| 84 | + "parameters": "first" |
| 85 | + }, |
| 86 | + "CallExpression": { |
| 87 | + "arguments": "first" |
| 88 | + }, |
| 89 | + "ArrayExpression": "first", |
| 90 | + "ObjectExpression": "first", |
| 91 | + "ImportDeclaration": "first" |
| 92 | + } |
| 93 | + ], |
| 94 | + "jsx-quotes": ["error", "prefer-single"], |
| 95 | + "key-spacing": [ |
| 96 | + "warn", |
| 97 | + { |
| 98 | + "align": { |
| 99 | + "beforeColon": true, |
| 100 | + "afterColon": true, |
| 101 | + "on": "colon" |
| 102 | + } |
| 103 | + } |
| 104 | + ], |
| 105 | + "keyword-spacing": "warn", |
| 106 | + "lines-around-directive": "error", |
| 107 | + "lines-between-class-members": "warn", |
| 108 | + "max-statements-per-line": [ |
| 109 | + "error", |
| 110 | + { |
| 111 | + "max": 2 |
| 112 | + } |
| 113 | + ], |
| 114 | + "new-cap": [ |
| 115 | + "error", |
| 116 | + { |
| 117 | + "capIsNew": false |
| 118 | + } |
| 119 | + ], |
| 120 | + "newline-per-chained-call": "warn", |
| 121 | + "no-bitwise": "error", |
| 122 | + "no-class-assign": "error", |
| 123 | + "no-compare-neg-zero": "error", |
| 124 | + "no-cond-assign": "error", |
| 125 | + "no-const-assign": "error", |
| 126 | + "no-constant-condition": "error", |
| 127 | + "no-dupe-args": "error", |
| 128 | + "no-dupe-class-members": "error", |
| 129 | + "no-dupe-keys": "error", |
| 130 | + "no-duplicate-case": "error", |
| 131 | + "no-empty": "error", |
| 132 | + "no-empty-character-class": "error", |
| 133 | + "no-empty-function": "error", |
| 134 | + "no-empty-pattern": "error", |
| 135 | + "no-eq-null": "error", |
| 136 | + "no-ex-assign": "error", |
| 137 | + "no-extra-bind": "error", |
| 138 | + "no-extra-boolean-cast": "warn", |
| 139 | + "no-extra-parens": [ |
| 140 | + "warn", |
| 141 | + "all", |
| 142 | + { |
| 143 | + "ignoreJSX": "multi-line" |
| 144 | + } |
| 145 | + ], |
| 146 | + "no-extra-semi": "error", |
| 147 | + "no-floating-decimal": "warn", |
| 148 | + "no-func-assign": "error", |
| 149 | + "no-global-assign": "error", |
| 150 | + "no-invalid-regexp": "error", |
| 151 | + "no-labels": "error", |
| 152 | + "no-lone-blocks": "error", |
| 153 | + "no-lonely-if": "warn", |
| 154 | + "no-loop-func": "error", |
| 155 | + "no-mixed-spaces-and-tabs": "error", |
| 156 | + "no-multi-assign": "error", |
| 157 | + "no-multi-spaces": [ |
| 158 | + "off", |
| 159 | + { |
| 160 | + "exceptions": { |
| 161 | + "Property": true |
| 162 | + } |
| 163 | + } |
| 164 | + ], |
| 165 | + "no-multi-str": "error", |
| 166 | + "no-multiple-empty-lines": [ |
| 167 | + "warn", |
| 168 | + { |
| 169 | + "max": 1, |
| 170 | + "maxBOF": 0 |
| 171 | + } |
| 172 | + ], |
| 173 | + "import/no-named-as-default": "off", |
| 174 | + "no-negated-condition": "error", |
| 175 | + "no-new-func": "error", |
| 176 | + "no-new-object": "error", |
| 177 | + "no-new-wrappers": "error", |
| 178 | + "no-obj-calls": "error", |
| 179 | + "no-octal": "error", |
| 180 | + "no-redeclare": "error", |
| 181 | + "no-regex-spaces": "error", |
| 182 | + "no-return-await": "error", |
| 183 | + "no-self-assign": "error", |
| 184 | + "no-self-compare": "error", |
| 185 | + "no-shadow-restricted-names": "error", |
| 186 | + "no-spaced-func": "warn", |
| 187 | + "no-sparse-arrays": "error", |
| 188 | + "no-template-curly-in-string": "error", |
| 189 | + "no-this-before-super": "error", |
| 190 | + "no-trailing-spaces": "warn", |
| 191 | + "no-undef": "error", |
| 192 | + "no-undef-init": "error", |
| 193 | + "no-undefined": "error", |
| 194 | + "no-unexpected-multiline": "error", |
| 195 | + "no-unmodified-loop-condition": "error", |
| 196 | + "no-unneeded-ternary": "error", |
| 197 | + "no-unreachable": "error", |
| 198 | + "no-unsafe-negation": "error", |
| 199 | + "no-unused-vars": "error", |
| 200 | + "no-use-before-define": "error", |
| 201 | + "no-useless-computed-key": "error", |
| 202 | + "no-useless-concat": "error", |
| 203 | + "no-useless-constructor": "error", |
| 204 | + "no-useless-escape": "error", |
| 205 | + "no-useless-rename": "error", |
| 206 | + "no-useless-return": "error", |
| 207 | + "no-var": "error", |
| 208 | + "no-whitespace-before-property": "error", |
| 209 | + "nonblock-statement-body-position": ["error", "beside"], |
| 210 | + "object-curly-newline": [ |
| 211 | + "warn", |
| 212 | + { |
| 213 | + "multiline": true |
| 214 | + } |
| 215 | + ], |
| 216 | + "object-curly-spacing": ["warn", "always"], |
| 217 | + "object-property-newline": "warn", |
| 218 | + "object-shorthand": [ |
| 219 | + "error", |
| 220 | + "always", |
| 221 | + { |
| 222 | + "avoidExplicitReturnArrows": true, |
| 223 | + "avoidQuotes": true |
| 224 | + } |
| 225 | + ], |
| 226 | + "one-var-declaration-per-line": ["warn", "always"], |
| 227 | + "operator-linebreak": "error", |
| 228 | + "padded-blocks": ["warn", "never"], |
| 229 | + "padding-line-between-statements": [ |
| 230 | + "warn", |
| 231 | + { |
| 232 | + "blankLine": "always", |
| 233 | + "prev": ["const", "let", "var"], |
| 234 | + "next": "*" |
| 235 | + }, |
| 236 | + { |
| 237 | + "blankLine": "any", |
| 238 | + "prev": ["const", "let", "var"], |
| 239 | + "next": ["const", "let", "var"] |
| 240 | + }, |
| 241 | + { |
| 242 | + "blankLine": "always", |
| 243 | + "prev": ["expression"], |
| 244 | + "next": "*" |
| 245 | + }, |
| 246 | + { |
| 247 | + "blankLine": "always", |
| 248 | + "prev": ["*"], |
| 249 | + "next": "expression" |
| 250 | + } |
| 251 | + ], |
| 252 | + "prefer-arrow-callback": "error", |
| 253 | + "prefer-const": "error", |
| 254 | + "prefer-destructuring": [ |
| 255 | + "error", |
| 256 | + { |
| 257 | + "array": true, |
| 258 | + "object": true |
| 259 | + }, |
| 260 | + { |
| 261 | + "enforceForRenamedProperties": false |
| 262 | + } |
| 263 | + ], |
| 264 | + "prefer-rest-params": "error", |
| 265 | + "prefer-spread": "error", |
| 266 | + "prefer-template": "warn", |
| 267 | + "quote-props": ["error", "as-needed"], |
| 268 | + "quotes": [ |
| 269 | + "warn", |
| 270 | + "single", |
| 271 | + { |
| 272 | + "allowTemplateLiterals": true, |
| 273 | + "avoidEscape": true |
| 274 | + } |
| 275 | + ], |
| 276 | + "require-await": "off", |
| 277 | + "rest-spread-spacing": ["error", "never"], |
| 278 | + "semi-spacing": "warn", |
| 279 | + "semi-style": "error", |
| 280 | + "semi": "warn", |
| 281 | + "sort-imports": "error", |
| 282 | + "sort-keys": [ |
| 283 | + "error", |
| 284 | + "asc", |
| 285 | + { |
| 286 | + "caseSensitive": true, |
| 287 | + "natural": true |
| 288 | + } |
| 289 | + ], |
| 290 | + "sort-vars": "error", |
| 291 | + "space-before-blocks": "warn", |
| 292 | + "space-before-function-paren": "warn", |
| 293 | + "space-in-parens": ["warn", "always"], |
| 294 | + "space-infix-ops": "warn", |
| 295 | + "space-unary-ops": "error", |
| 296 | + "switch-colon-spacing": "error", |
| 297 | + "template-curly-spacing": ["error", "never"], |
| 298 | + "template-tag-spacing": "error", |
| 299 | + "use-isnan": "error", |
| 300 | + "valid-typeof": [ |
| 301 | + "error", |
| 302 | + { |
| 303 | + "requireStringLiterals": true |
| 304 | + } |
| 305 | + ], |
| 306 | + "vars-on-top": "error", |
| 307 | + "yoda": "error" |
| 308 | + }, |
| 309 | + "root": true |
| 310 | +} |
0 commit comments