File tree Expand file tree Collapse file tree 3 files changed +65
-10
lines changed Expand file tree Collapse file tree 3 files changed +65
-10
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ parser : '@typescript-eslint/parser' ,
3
+ extends : [
4
+ 'airbnb-typescript' ,
5
+ 'plugin:react/recommended' ,
6
+ 'plugin:react-hooks/recommended' ,
7
+ 'plugin:@typescript-eslint/recommended' ,
8
+ 'plugin:jsx-a11y/recommended' ,
9
+ 'plugin:jest/recommended' ,
10
+ 'prettier/@typescript-eslint' ,
11
+ 'prettier' ,
12
+ ] ,
13
+ plugins : [ 'react-hooks' ] ,
14
+ parserOptions : {
15
+ ecmaFeatures : {
16
+ jsx : true ,
17
+ } ,
18
+ ecmaVersion : 2020 ,
19
+ sourceType : 'module' ,
20
+ project : './tsconfig.json' ,
21
+ } ,
22
+ rules : {
23
+ 'react-hooks/rules-of-hooks' : 'error' ,
24
+ 'react-hooks/exhaustive-deps' : 'warn' ,
25
+ 'react/prop-types' : 'off' ,
26
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
27
+ curly : 'error' ,
28
+ '@typescript-eslint/no-unused-vars' : 'warn' , // Imports of interfaces throw this.
29
+ 'react/jsx-one-expression-per-line' : 0 ,
30
+ } ,
31
+ settings : {
32
+ react : {
33
+ version : 'detect' ,
34
+ } ,
35
+ } ,
36
+ ignorePatterns : [ 'node_modules/' , 'src/registerServiceWorker.ts' ] ,
37
+ } ;
Original file line number Diff line number Diff line change 1
1
{
2
- "singleQuote": true,
3
- "trailingComma": "es5",
4
- "printWidth": 150,
5
- "overrides": [{
6
- "files": ".prettierrc",
7
- "options": {
8
- "parser": "json"
9
- }
10
- }]
11
- }
2
+ "singleQuote": true,
3
+ "trailingComma": "es5",
4
+ "printWidth": 100,
5
+ "overrides": [
6
+ {
7
+ "files": ".prettierrc",
8
+ "options": {
9
+ "parser": "json"
10
+ }
11
+ }
12
+ ]
13
+ }
Original file line number Diff line number Diff line change 25
25
"react-scripts" : " ^3.2.0" ,
26
26
"recharts" : " ^1.8.5"
27
27
},
28
+ "eslintConfig" : {
29
+ "extends" : " react-app"
30
+ },
28
31
"scripts" : {
29
32
"start" : " craco start" ,
30
33
"build" : " craco build" ,
34
+ "lint" : " eslint . --ext .ts,.tsx" ,
31
35
"test" : " craco test" ,
32
36
"eject" : " react-scripts eject"
33
37
},
43
47
"@types/react-loadable" : " ^5.5.2" ,
44
48
"@types/react-router-dom" : " ^5.1.3" ,
45
49
"@types/recharts" : " ^1.8.3" ,
50
+ "@typescript-eslint/eslint-plugin" : " ^4.0.1" ,
51
+ "@typescript-eslint/parser" : " ^4.0.1" ,
46
52
"copy-webpack-plugin" : " ^5.0.5" ,
53
+ "eslint" : " ^6.8.0" ,
54
+ "eslint-config-airbnb-typescript" : " ^9.0.0" ,
55
+ "eslint-config-prettier" : " ^6.11.0" ,
56
+ "eslint-plugin-import" : " ^2.22.0" ,
57
+ "eslint-plugin-jest" : " ^23.17.1" ,
58
+ "eslint-plugin-jsx-a11y" : " ^6.3.1" ,
59
+ "eslint-plugin-prettier" : " ^3.1.4" ,
60
+ "eslint-plugin-react" : " ^7.20.6" ,
61
+ "eslint-plugin-react-hooks" : " ^4.1.0" ,
62
+ "prettier" : " ^2.0.5" ,
47
63
"ts-import-plugin" : " ^1.6.1" ,
48
64
"typescript" : " ^3.7.2"
49
65
},
You can’t perform that action at this time.
0 commit comments