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 11{
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 2525 "react-scripts" : " ^3.2.0" ,
2626 "recharts" : " ^1.8.5"
2727 },
28+ "eslintConfig" : {
29+ "extends" : " react-app"
30+ },
2831 "scripts" : {
2932 "start" : " craco start" ,
3033 "build" : " craco build" ,
34+ "lint" : " eslint . --ext .ts,.tsx" ,
3135 "test" : " craco test" ,
3236 "eject" : " react-scripts eject"
3337 },
4347 "@types/react-loadable" : " ^5.5.2" ,
4448 "@types/react-router-dom" : " ^5.1.3" ,
4549 "@types/recharts" : " ^1.8.3" ,
50+ "@typescript-eslint/eslint-plugin" : " ^4.0.1" ,
51+ "@typescript-eslint/parser" : " ^4.0.1" ,
4652 "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" ,
4763 "ts-import-plugin" : " ^1.6.1" ,
4864 "typescript" : " ^3.7.2"
4965 },
You can’t perform that action at this time.
0 commit comments