|
1 | 1 | { |
2 | 2 | "plugins": [ |
3 | | - "babel" |
| 3 | + "react", |
| 4 | + "@typescript-eslint" |
4 | 5 | ], |
5 | | - "parser": "babel-eslint", |
| 6 | + "parser": "@typescript-eslint/parser", |
6 | 7 | "rules": { |
7 | | - "comma-dangle": [2, "always-multiline"], |
8 | | - "space-before-function-paren": [2, "never"], |
| 8 | + |
| 9 | + // stops the 'React' was used before it was defined no-use-before-define error for .js files. |
| 10 | + "no-use-before-define": "off", |
| 11 | + "@typescript-eslint/no-use-before-define": ["error"], |
| 12 | + |
| 13 | + "react/prop-types": 1, |
| 14 | + "react/jsx-handler-names": "off", |
| 15 | + "react/jsx-uses-react": "error", |
| 16 | + "react/jsx-uses-vars": "error", |
| 17 | + |
| 18 | + "comma-dangle": [2, { |
| 19 | + "arrays": "always-multiline", |
| 20 | + "exports": "always-multiline", |
| 21 | + "functions": "never", |
| 22 | + "imports": "always-multiline", |
| 23 | + "objects": "always-multiline" |
| 24 | + }], |
| 25 | + |
| 26 | + "space-before-function-paren": [2, { |
| 27 | + "anonymous": "never", |
| 28 | + "named": "never", |
| 29 | + "asyncArrow": "always" |
| 30 | + }], |
| 31 | + |
9 | 32 | "jsx-quotes": [2, "prefer-double"], |
10 | 33 | "no-var": 2, |
11 | 34 |
|
12 | | - "babel/no-invalid-this": 1, |
13 | | - "babel/semi": [2, "never"], |
14 | | - "react/prop-types": "warn" |
| 35 | + "semi": [2, "never"], |
| 36 | + "lines-between-class-members": "off" |
15 | 37 | }, |
| 38 | + |
16 | 39 | "extends": ["standard", "standard-react"], |
| 40 | + |
17 | 41 | "env": { |
| 42 | + "browser": true, |
18 | 43 | "jest": true, |
| 44 | + "jasmine": true |
19 | 45 | } |
20 | 46 | } |
0 commit comments