|
1 | 1 | { |
2 | | - "extends": [ |
3 | | - "airbnb-base", |
4 | | - "airbnb/rules/react", |
5 | | - ], |
6 | | - "plugins": [ |
7 | | - "@typescript-eslint", |
8 | | - "simple-import-sort" |
9 | | - ], |
10 | | - "parser": "@typescript-eslint/parser", |
11 | | - "parserOptions": { |
12 | | - "ecmaVersion": 2018, |
13 | | - "sourceType": "module" |
14 | | - }, |
15 | | - "rules": { |
16 | | - "react/prefer-stateless-function": 0, |
17 | | - "react/jsx-filename-extension": 0, |
18 | | - "react/jsx-one-expression-per-line": 0, |
19 | | - "react/jsx-props-no-spreading": 0, |
20 | | - "react/state-in-constructor": "off", |
21 | | - "react/destructuring-assignment": "warn", |
22 | | - "react/no-unused-state": "warn", |
23 | | - "react/button-has-type": "warn", |
24 | | - "react/no-array-index-key": "warn", |
25 | | - "react/sort-comp": "off", |
26 | | - "react/prop-types": "warn", |
27 | | - "react/require-default-props": "warn", |
28 | | - "import/prefer-default-export": "warn", |
29 | | - "import/named": "warn", |
30 | | - "import/no-named-as-default": "off", |
31 | | - "import/extensions": [ |
32 | | - "error", |
33 | | - "ignorePackages", |
34 | | - { |
35 | | - "js": "never", |
36 | | - "jsx": "never", |
37 | | - "ts": "never", |
38 | | - "tsx": "never" |
39 | | - } |
40 | | - ], |
41 | | - "@typescript-eslint/type-annotation-spacing": ["warn", { "before": false, "after": true, "overrides": { "colon": { "before": true, "after": true }, "arrow": { "before": true, "after": true } } }], |
42 | | - "arrow-parens": ["warn", "as-needed"], |
43 | | - "no-nested-ternary": "off", |
44 | | - "no-unused-expressions": "off", |
45 | | - "no-unused-vars": "off", |
46 | | - "@typescript-eslint/no-unused-vars": "off", |
47 | | - "no-useless-constructor": "off", |
48 | | - "@typescript-eslint/no-useless-constructor": "warn", |
49 | | - "space-before-function-paren": ["warn", "always"], |
50 | | - "no-spaced-func": "off", |
51 | | - "func-call-spacing": ["warn", "always"], |
52 | | - "no-underscore-dangle": "off", |
53 | | - "no-mixed-spaces-and-tabs": "error", |
54 | | - "no-shadow": "warn", |
55 | | - "max-len": ["warn", 150], |
56 | | - "no-console": ["warn", { "allow": ["warn", "error"] }], |
57 | | - "func-names": "off", |
58 | | - "no-plusplus": ["warn", { |
59 | | - "allowForLoopAfterthoughts": true |
60 | | - }], |
61 | | - "no-trailing-spaces": "warn", |
62 | | - "indent": ["warn", 2], |
63 | | - "semi": ["warn", "always"], |
64 | | - "no-param-reassign": ["warn", { "props": true, "ignorePropertyModificationsFor": ["draft"] }], |
65 | | - "simple-import-sort/sort": [ |
66 | | - 1, |
67 | | - { |
68 | | - "groups": [ |
69 | | - ["^\\u0000"], |
70 | | - [ |
71 | | - "^react$", |
72 | | - "^prop-types$", |
73 | | - "^react-router-dom$", |
74 | | - "^react-redux$", |
75 | | - "^react", |
76 | | - "^styled-components$", |
77 | | - "^[^.]" |
78 | | - ], |
79 | | - [ |
80 | | - "^containers", |
81 | | - "^components", |
82 | | - "^atoms", |
83 | | - "^molecules", |
84 | | - "^organisms", |
85 | | - "^templates", |
86 | | - "^pages" |
87 | | - ], |
88 | | - [ |
89 | | - "^store", |
90 | | - "^hoc", |
91 | | - "^hooks", |
92 | | - "^lib" |
93 | | - ], |
94 | | - [ |
95 | | - "^(static)", |
96 | | - "^(?!(assets|static)($|/))\\w" |
97 | | - ], |
98 | | - ["^\\."] |
99 | | - ] |
100 | | - } |
101 | | - ] |
| 2 | + "settings": { |
| 3 | + "react": { |
| 4 | + "version": "detect" |
| 5 | + } |
102 | 6 | }, |
103 | 7 | "env": { |
104 | | - "browser": true |
| 8 | + "browser": true, |
| 9 | + "node": true, |
| 10 | + "jest": true |
105 | 11 | }, |
106 | | - "settings": { |
107 | | - "import/resolver": { |
108 | | - "node": { |
109 | | - "moduleDirectory": ["node_modules", "src", "src/components"], |
110 | | - "extensions": [".js",".jsx",".ts",".tsx"] |
111 | | - } |
112 | | - }, |
113 | | - "import/extensions": [".js",".jsx",".ts",".tsx"], |
114 | | - "import/parsers": { |
115 | | - "@typescript-eslint/parser": [".ts",".tsx"] |
116 | | - } |
| 12 | + "extends": [ |
| 13 | + "eslint:recommended", |
| 14 | + "plugin:react/recommended", |
| 15 | + "plugin:react-hooks/recommended", |
| 16 | + "plugin:@typescript-eslint/recommended", |
| 17 | + "plugin:import/typescript", |
| 18 | + "prettier" |
| 19 | + ], |
| 20 | + "rules": { |
| 21 | + "react/prop-types": "warn" |
117 | 22 | }, |
118 | | - "overrides": [ |
119 | | - { |
120 | | - "files": ["*.stories.js", "*.test.js"], |
121 | | - "rules": { |
122 | | - "import/no-extraneous-dependencies": "off", |
123 | | - } |
124 | | - }, |
125 | | - { |
126 | | - "files": ["*.test.js"], |
127 | | - "env": { |
128 | | - "jest": true |
129 | | - } |
130 | | - } |
131 | | - ] |
| 23 | + "parser": "@typescript-eslint/parser", |
| 24 | + "root": true, |
| 25 | + "parserOptions": { |
| 26 | + "project": "./tsconfig.json" |
| 27 | + } |
132 | 28 | } |
0 commit comments