|
1 | 1 | { |
2 | 2 | "parser": "babel-eslint", |
3 | | - "plugins": [ |
4 | | - "react", |
5 | | - "mozilla", |
6 | | - "flowtype", |
7 | | - "babel", |
8 | | - "prettier" |
9 | | - ], |
| 3 | + "plugins": ["react", "mozilla", "flowtype", "babel", "prettier"], |
10 | 4 | "globals": { |
11 | 5 | "atob": true, |
12 | 6 | "btoa": true, |
|
35 | 29 | "extends": [ |
36 | 30 | "prettier", |
37 | 31 | "prettier/flowtype", |
38 | | - "prettier/react" |
| 32 | + "prettier/react", |
| 33 | + "plugin:jest/recommended" |
39 | 34 | ], |
40 | 35 | "parserOptions": { |
41 | 36 | "ecmaVersion": 2016, |
42 | 37 | "sourceType": "module", |
43 | 38 | "ecmaFeatures": { "jsx": true } |
44 | 39 | }, |
45 | 40 | "env": { |
46 | | - "es6": true, |
47 | | - "browser": true, |
48 | | - "commonjs": true, |
49 | | - "jest": true |
| 41 | + "es6": true, |
| 42 | + "browser": true, |
| 43 | + "commonjs": true, |
| 44 | + "jest": true |
50 | 45 | }, |
51 | 46 | "rules": { |
52 | 47 | // These are the rules that have been configured so far to match the |
|
68 | 63 | "react/no-direct-mutation-state": 1, |
69 | 64 | "react/no-unknown-property": 1, |
70 | 65 | "react/prop-types": 1, |
71 | | - "react/sort-comp": [1, { |
72 | | - order: [ |
73 | | - "propTypes", |
74 | | - "everything-else", |
75 | | - "render" |
76 | | - ] |
77 | | - }], |
| 66 | + "react/sort-comp": [ |
| 67 | + 1, |
| 68 | + { |
| 69 | + order: ["propTypes", "everything-else", "render"] |
| 70 | + } |
| 71 | + ], |
78 | 72 |
|
79 | 73 | // Enforce the spacing around the * in generator functions. |
80 | | - "babel/generator-star-spacing": [2, "after"], |
| 74 | + "babel/generator-star-spacing": [2, "after"], |
81 | 75 |
|
82 | 76 | "flowtype/define-flow-type": 1, |
83 | 77 | "flowtype/use-flow-type": 1, |
|
125 | 119 | // rule is a better rule to check this. |
126 | 120 | "max-depth": 0, |
127 | 121 | // Maximum length of a line. |
128 | | - "max-len": [2, 80, 2, {"ignoreUrls": true, "ignorePattern": "\\s*require\\s*\\(|^\\s*loader\\.lazy|-\\*-"}], |
| 122 | + "max-len": [ |
| 123 | + 2, |
| 124 | + 80, |
| 125 | + 2, |
| 126 | + { |
| 127 | + "ignoreUrls": true, |
| 128 | + "ignorePattern": "\\s*require\\s*\\(|^\\s*loader\\.lazy|-\\*-" |
| 129 | + } |
| 130 | + ], |
129 | 131 | // Maximum depth callbacks can be nested. |
130 | 132 | "max-nested-callbacks": [2, 3], |
131 | 133 | // Don't limit the number of parameters that can be used in a function. |
|
136 | 138 | // Require a capital letter for constructors, only check if all new |
137 | 139 | // operators are followed by a capital letter. Don't warn when capitalized |
138 | 140 | // functions are used without the new operator. |
139 | | - "new-cap": [2, {"capIsNew": false}], |
| 141 | + "new-cap": [2, { "capIsNew": false }], |
140 | 142 | // Disallow use of the Array constructor. |
141 | 143 | "no-array-constructor": 2, |
142 | 144 | // Allow use of bitwise operators. |
|
211 | 213 | // Disallow use of multiline strings (use template strings instead). |
212 | 214 | "no-multi-str": 2, |
213 | 215 | "prefer-template": "error", |
214 | | - "prefer-const": ["error", { |
215 | | - "destructuring": "all", |
216 | | - "ignoreReadBeforeAssign": false |
217 | | - }], |
| 216 | + "prefer-const": [ |
| 217 | + "error", |
| 218 | + { |
| 219 | + "destructuring": "all", |
| 220 | + "ignoreReadBeforeAssign": false |
| 221 | + } |
| 222 | + ], |
218 | 223 | // Disallow reassignments of native objects. |
219 | 224 | "no-native-reassign": 2, |
220 | 225 | // Disallow nested ternary expressions, they make the code hard to read. |
|
287 | 292 | // statement. |
288 | 293 | "no-unreachable": 2, |
289 | 294 | // Disallow global and local variables that arent used, but allow unused function arguments. |
290 | | - "no-unused-vars": [2, {"vars": "all", "args": "none"}], |
| 295 | + "no-unused-vars": [2, { "vars": "all", "args": "none" }], |
291 | 296 | // Allow using variables before they are defined. |
292 | 297 | "no-use-before-define": 0, |
293 | 298 | // We use var-only-at-top-level instead of no-var as we allow top level |
|
0 commit comments