|
1 | 1 | {
|
| 2 | + "extends": [ |
| 3 | + "eslint:recommended", |
| 4 | + "prettier" |
| 5 | + ], |
| 6 | + "parser": "babel-eslint", |
2 | 7 | "parserOptions": {
|
3 | 8 | "ecmaVersion": 6,
|
4 | 9 | "sourceType": "module",
|
5 | 10 | "ecmaFeatures": {
|
| 11 | + "arrowFunctions": true, |
| 12 | + "blockBindings": true, |
| 13 | + "classes": true, |
| 14 | + "defaultParams": true, |
| 15 | + "destructuring": true, |
| 16 | + "forOf": true, |
| 17 | + "generators": true, |
| 18 | + "modules": true, |
| 19 | + "templateStrings": true, |
6 | 20 | "jsx": true
|
7 | 21 | }
|
8 | 22 | },
|
9 |
| - "rules": { |
10 |
| - "semi": 2, |
11 |
| - "no-unused-vars": 2, |
12 |
| - "react/display-name": 2, |
13 |
| - "react/jsx-key": 2, |
14 |
| - "react/jsx-no-comment-textnodes": 2, |
15 |
| - "react/jsx-no-duplicate-props": 2, |
16 |
| - "react/jsx-no-target-blank": 2, |
17 |
| - "react/jsx-no-undef": 2, |
18 |
| - "react/jsx-uses-react": 2, |
19 |
| - "react/jsx-uses-vars": 2, |
20 |
| - "react/no-children-prop": 2, |
21 |
| - "react/no-danger-with-children": 2, |
22 |
| - "react/no-deprecated": 2, |
23 |
| - "react/no-direct-mutation-state": 2, |
24 |
| - "react/no-find-dom-node": 2, |
25 |
| - "react/no-is-mounted": 2, |
26 |
| - "react/no-render-return-value": 2, |
27 |
| - "react/no-string-refs": 2, |
28 |
| - "react/no-unescaped-entities": 2, |
29 |
| - "react/no-unknown-property": 2, |
30 |
| - "react/prop-types": 2, |
31 |
| - "react/react-in-jsx-scope": 2, |
32 |
| - "react/require-render-return": 2, |
| 23 | + "env": { |
| 24 | + "browser": true, |
| 25 | + "es6": true, |
| 26 | + "jasmine": true, |
| 27 | + "jest": true, |
| 28 | + "node": true |
| 29 | + }, |
| 30 | + "globals": { |
| 31 | + "jest": true |
33 | 32 | },
|
34 | 33 | "plugins": [
|
35 |
| - "react" |
| 34 | + "react", |
| 35 | + "import" |
36 | 36 | ],
|
37 |
| - "settings": { |
38 |
| - "react": { |
39 |
| - "version": "^15.6.1" |
| 37 | + "overrides": [ |
| 38 | + { |
| 39 | + "files": [ |
| 40 | + "**/*.percy.{js,jsx}" |
| 41 | + ], |
| 42 | + "env": { |
| 43 | + "react-percy/globals": true |
| 44 | + } |
40 | 45 | }
|
| 46 | + ], |
| 47 | + "rules": { |
| 48 | + "accessor-pairs": [ |
| 49 | + "error" |
| 50 | + ], |
| 51 | + "block-scoped-var": [ |
| 52 | + "error" |
| 53 | + ], |
| 54 | + "consistent-return": [ |
| 55 | + "error" |
| 56 | + ], |
| 57 | + "curly": [ |
| 58 | + "error", |
| 59 | + "all" |
| 60 | + ], |
| 61 | + "default-case": [ |
| 62 | + "error" |
| 63 | + ], |
| 64 | + "dot-location": [ |
| 65 | + "off" |
| 66 | + ], |
| 67 | + "dot-notation": [ |
| 68 | + "error" |
| 69 | + ], |
| 70 | + "eqeqeq": [ |
| 71 | + "error" |
| 72 | + ], |
| 73 | + "guard-for-in": [ |
| 74 | + "off" |
| 75 | + ], |
| 76 | + "import/named": [ |
| 77 | + "off" |
| 78 | + ], |
| 79 | + "import/no-duplicates": [ |
| 80 | + "error" |
| 81 | + ], |
| 82 | + "import/no-named-as-default": [ |
| 83 | + "error" |
| 84 | + ], |
| 85 | + "new-cap": [ |
| 86 | + "error" |
| 87 | + ], |
| 88 | + "no-alert": [ |
| 89 | + 1 |
| 90 | + ], |
| 91 | + "no-caller": [ |
| 92 | + "error" |
| 93 | + ], |
| 94 | + "no-case-declarations": [ |
| 95 | + "error" |
| 96 | + ], |
| 97 | + "no-console": [ |
| 98 | + "error" |
| 99 | + ], |
| 100 | + "no-div-regex": [ |
| 101 | + "error" |
| 102 | + ], |
| 103 | + "no-dupe-keys": [ |
| 104 | + "error" |
| 105 | + ], |
| 106 | + "no-else-return": [ |
| 107 | + "error" |
| 108 | + ], |
| 109 | + "no-empty-pattern": [ |
| 110 | + "error" |
| 111 | + ], |
| 112 | + "no-eq-null": [ |
| 113 | + "error" |
| 114 | + ], |
| 115 | + "no-eval": [ |
| 116 | + "error" |
| 117 | + ], |
| 118 | + "no-extend-native": [ |
| 119 | + "error" |
| 120 | + ], |
| 121 | + "no-extra-bind": [ |
| 122 | + "error" |
| 123 | + ], |
| 124 | + "no-extra-boolean-cast": [ |
| 125 | + "error" |
| 126 | + ], |
| 127 | + "no-inline-comments": [ |
| 128 | + "error" |
| 129 | + ], |
| 130 | + "no-implicit-coercion": [ |
| 131 | + "error" |
| 132 | + ], |
| 133 | + "no-implied-eval": [ |
| 134 | + "error" |
| 135 | + ], |
| 136 | + "no-inner-declarations": [ |
| 137 | + "off" |
| 138 | + ], |
| 139 | + "no-invalid-this": [ |
| 140 | + "error" |
| 141 | + ], |
| 142 | + "no-iterator": [ |
| 143 | + "error" |
| 144 | + ], |
| 145 | + "no-labels": [ |
| 146 | + "error" |
| 147 | + ], |
| 148 | + "no-lone-blocks": [ |
| 149 | + "error" |
| 150 | + ], |
| 151 | + "no-loop-func": [ |
| 152 | + "error" |
| 153 | + ], |
| 154 | + "no-multi-str": [ |
| 155 | + "error" |
| 156 | + ], |
| 157 | + "no-native-reassign": [ |
| 158 | + "error" |
| 159 | + ], |
| 160 | + "no-new": [ |
| 161 | + "error" |
| 162 | + ], |
| 163 | + "no-new-func": [ |
| 164 | + "error" |
| 165 | + ], |
| 166 | + "no-new-wrappers": [ |
| 167 | + "error" |
| 168 | + ], |
| 169 | + "no-param-reassign": [ |
| 170 | + "error" |
| 171 | + ], |
| 172 | + "no-process-env": [ |
| 173 | + "warn" |
| 174 | + ], |
| 175 | + "no-proto": [ |
| 176 | + "error" |
| 177 | + ], |
| 178 | + "no-redeclare": [ |
| 179 | + "error" |
| 180 | + ], |
| 181 | + "no-return-assign": [ |
| 182 | + "error" |
| 183 | + ], |
| 184 | + "no-script-url": [ |
| 185 | + "error" |
| 186 | + ], |
| 187 | + "no-self-compare": [ |
| 188 | + "error" |
| 189 | + ], |
| 190 | + "no-sequences": [ |
| 191 | + "error" |
| 192 | + ], |
| 193 | + "no-shadow": [ |
| 194 | + "off" |
| 195 | + ], |
| 196 | + "no-throw-literal": [ |
| 197 | + "error" |
| 198 | + ], |
| 199 | + "no-undefined": [ |
| 200 | + "error" |
| 201 | + ], |
| 202 | + "no-unused-expressions": [ |
| 203 | + "error" |
| 204 | + ], |
| 205 | + "no-use-before-define": [ |
| 206 | + "error", |
| 207 | + "nofunc" |
| 208 | + ], |
| 209 | + "no-useless-call": [ |
| 210 | + "error" |
| 211 | + ], |
| 212 | + "no-useless-concat": [ |
| 213 | + "error" |
| 214 | + ], |
| 215 | + "no-with": [ |
| 216 | + "error" |
| 217 | + ], |
| 218 | + "prefer-const": [ |
| 219 | + "error" |
| 220 | + ], |
| 221 | + "radix": [ |
| 222 | + "error" |
| 223 | + ], |
| 224 | + "react/jsx-no-duplicate-props": [ |
| 225 | + "error" |
| 226 | + ], |
| 227 | + "react/jsx-no-undef": [ |
| 228 | + "error" |
| 229 | + ], |
| 230 | + "react/jsx-uses-react": [ |
| 231 | + "error" |
| 232 | + ], |
| 233 | + "react/jsx-uses-vars": [ |
| 234 | + "error" |
| 235 | + ], |
| 236 | + "react/no-did-update-set-state": [ |
| 237 | + "error" |
| 238 | + ], |
| 239 | + "react/no-direct-mutation-state": [ |
| 240 | + "error" |
| 241 | + ], |
| 242 | + "react/no-is-mounted": [ |
| 243 | + "error" |
| 244 | + ], |
| 245 | + "react/no-unknown-property": [ |
| 246 | + "error" |
| 247 | + ], |
| 248 | + "react/prefer-es6-class": [ |
| 249 | + "error", |
| 250 | + "always" |
| 251 | + ], |
| 252 | + "react/prop-types": "error", |
| 253 | + "valid-jsdoc": [ |
| 254 | + "error" |
| 255 | + ], |
| 256 | + "yoda": [ |
| 257 | + "error" |
| 258 | + ], |
| 259 | + "spaced-comment": [ |
| 260 | + "error", |
| 261 | + "always", |
| 262 | + { |
| 263 | + "block": { |
| 264 | + "exceptions": [ |
| 265 | + "*" |
| 266 | + ] |
| 267 | + } |
| 268 | + } |
| 269 | + ], |
| 270 | + "no-unused-vars": [ |
| 271 | + "error", |
| 272 | + { |
| 273 | + "args": "after-used", |
| 274 | + "argsIgnorePattern": "^_", |
| 275 | + "caughtErrorsIgnorePattern": "^e$" |
| 276 | + } |
| 277 | + ], |
| 278 | + "no-magic-numbers": [ |
| 279 | + "error", |
| 280 | + { |
| 281 | + "ignoreArrayIndexes": true, |
| 282 | + "ignore": [ |
| 283 | + -1, |
| 284 | + 0, |
| 285 | + 1, |
| 286 | + 2, |
| 287 | + 3, |
| 288 | + 100, |
| 289 | + 10, |
| 290 | + 0.5 |
| 291 | + ] |
| 292 | + } |
| 293 | + ], |
| 294 | + "no-underscore-dangle": [ |
| 295 | + "off" |
| 296 | + ] |
41 | 297 | }
|
42 | 298 | }
|
0 commit comments