|
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": {
|
| 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 | + |
7 | 18 | "comma-dangle": [2, {
|
8 | 19 | "arrays": "always-multiline",
|
9 | 20 | "exports": "always-multiline",
|
10 | 21 | "functions": "never",
|
11 | 22 | "imports": "always-multiline",
|
12 | 23 | "objects": "always-multiline"
|
13 | 24 | }],
|
| 25 | + |
14 | 26 | "space-before-function-paren": [2, {
|
15 | 27 | "anonymous": "never",
|
16 | 28 | "named": "never",
|
17 | 29 | "asyncArrow": "always"
|
18 | 30 | }],
|
19 |
| - "react/jsx-handler-names": "off", |
| 31 | + |
20 | 32 | "jsx-quotes": [2, "prefer-double"],
|
21 | 33 | "no-var": 2,
|
22 | 34 |
|
23 |
| - "babel/no-invalid-this": 1, |
24 |
| - "babel/semi": [2, "never"], |
25 |
| - "react/prop-types": 1, |
26 | 35 | "semi": [2, "never"],
|
27 | 36 | "lines-between-class-members": "off"
|
28 | 37 | },
|
| 38 | + |
29 | 39 | "extends": ["standard", "standard-react"],
|
| 40 | + |
30 | 41 | "env": {
|
31 | 42 | "browser": true,
|
32 | 43 | "jest": true,
|
|
0 commit comments