|
1 | 1 | module.exports = { |
2 | | - parser: "@typescript-eslint/parser", |
| 2 | + parser: '@typescript-eslint/parser', |
3 | 3 | extends: [ |
4 | | - "plugin:react/recommended", |
5 | | - "prettier", |
6 | | - "plugin:prettier/recommended", |
7 | | - "plugin:tailwindcss/recommended", |
8 | | - "plugin:@tanstack/eslint-plugin-query/recommended", |
9 | | - ], |
10 | | - plugins: [ |
11 | | - "react", |
12 | | - "import-helpers", |
13 | | - "react-hooks", |
14 | | - "perfectionist", |
15 | | - "@tanstack/query", |
16 | | - "jest-formatting", |
17 | | - "jest", |
| 4 | + 'plugin:react/recommended', |
| 5 | + 'prettier', |
| 6 | + 'plugin:prettier/recommended', |
| 7 | + 'plugin:tailwindcss/recommended', |
| 8 | + 'plugin:@tanstack/eslint-plugin-query/recommended' |
18 | 9 | ], |
| 10 | + plugins: ['react', 'import-helpers', 'react-hooks', 'perfectionist', '@tanstack/query', 'jest-formatting', 'jest'], |
19 | 11 | overrides: [ |
20 | 12 | { |
21 | 13 | env: { |
22 | | - node: true, |
| 14 | + node: true |
23 | 15 | }, |
24 | | - files: ["*.ts", "*.tsx"], |
| 16 | + files: ['*.ts', '*.tsx'], |
25 | 17 | extends: [ |
26 | | - "plugin:@typescript-eslint/recommended", |
| 18 | + 'plugin:@typescript-eslint/recommended' |
27 | 19 | // 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
28 | 20 | ], |
29 | 21 | parserOptions: { |
30 | | - project: ["./tsconfig.json"], |
31 | | - }, |
32 | | - }, |
| 22 | + project: ['./tsconfig.json'] |
| 23 | + } |
| 24 | + } |
33 | 25 | ], |
34 | 26 | rules: { |
35 | | - "no-console": "warn", |
36 | | - "linebreak-style": "off", |
| 27 | + 'no-console': 'warn', |
| 28 | + 'linebreak-style': 'off', |
37 | 29 |
|
38 | | - "@typescript-eslint/no-unused-vars": "error", |
39 | | - "@typescript-eslint/unbound-method": "off", |
40 | | - "@typescript-eslint/no-empty-function": "off", |
41 | | - "@typescript-eslint/consistent-type-imports": "off", |
42 | | - "@typescript-eslint/no-confusing-void-expression": "off", |
43 | | - "@typescript-eslint/explicit-function-return-type": "off", |
44 | | - "@typescript-eslint/strict-boolean-expressions": "off", |
45 | | - "@typescript-eslint/no-empty-function": "off", |
46 | | - "@typescript-eslint/no-misused-promises": "off", |
47 | | - "@typescript-eslint/no-floating-promises": "off", |
48 | | - "@typescript-eslint/no-empty-function": "off", |
| 30 | + '@typescript-eslint/no-unused-vars': 'error', |
| 31 | + '@typescript-eslint/unbound-method': 'off', |
| 32 | + '@typescript-eslint/no-empty-function': 'off', |
| 33 | + '@typescript-eslint/consistent-type-imports': 'off', |
| 34 | + '@typescript-eslint/no-confusing-void-expression': 'off', |
| 35 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 36 | + '@typescript-eslint/strict-boolean-expressions': 'off', |
| 37 | + '@typescript-eslint/no-empty-function': 'off', |
| 38 | + '@typescript-eslint/no-misused-promises': 'off', |
| 39 | + '@typescript-eslint/no-floating-promises': 'off', |
| 40 | + '@typescript-eslint/no-empty-function': 'off', |
49 | 41 |
|
50 | | - "react/react-in-jsx-scope": "off", |
| 42 | + 'react/react-in-jsx-scope': 'off', |
51 | 43 |
|
52 | | - "react-hooks/rules-of-hooks": "error", |
53 | | - "react-hooks/exhaustive-deps": "warn", |
| 44 | + 'react-hooks/rules-of-hooks': 'error', |
| 45 | + 'react-hooks/exhaustive-deps': 'warn', |
54 | 46 |
|
55 | | - "tailwindcss/no-custom-classname": "off", |
| 47 | + 'tailwindcss/no-custom-classname': 'off', |
56 | 48 |
|
57 | | - "jest/valid-title": "error", |
58 | | - "jest/valid-expect": "error", |
59 | | - "jest/no-disabled-tests": "warn", |
60 | | - "jest/no-duplicate-hooks": "error", |
61 | | - "jest/no-identical-title": "error", |
62 | | - "jest-formatting/padding-around-all": 2, |
63 | | - "jest/require-top-level-describe": "error", |
64 | | - "jest/consistent-test-it": ["error", { fn: "it", withinDescribe: "it" }], |
| 49 | + 'jest/valid-title': 'error', |
| 50 | + 'jest/valid-expect': 'error', |
| 51 | + 'jest/no-disabled-tests': 'warn', |
| 52 | + 'jest/no-duplicate-hooks': 'error', |
| 53 | + 'jest/no-identical-title': 'error', |
| 54 | + 'jest-formatting/padding-around-all': 2, |
| 55 | + 'jest/require-top-level-describe': 'error', |
| 56 | + 'jest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }], |
65 | 57 |
|
66 | | - "prettier/prettier": [ |
67 | | - "error", |
| 58 | + 'prettier/prettier': [ |
| 59 | + 'error', |
68 | 60 | { |
69 | | - endOfLine: "auto", |
70 | | - }, |
| 61 | + endOfLine: 'auto' |
| 62 | + } |
71 | 63 | ], |
72 | 64 |
|
73 | | - // "import-helpers/order-imports": [ |
74 | | - // "warn", |
75 | | - // { |
76 | | - // newlinesBetween: "always", |
77 | | - // groups: [ |
78 | | - // ["/^react/", "module"], |
79 | | - // "/^~/", |
80 | | - // ["parent", "sibling", "index"], |
81 | | - // ], |
82 | | - // alphabetize: { order: "ignore", ignoreCase: true }, |
83 | | - // }, |
84 | | - // ], |
85 | | - |
86 | | - "perfectionist/sort-object-types": [ |
87 | | - "error", |
| 65 | + 'perfectionist/sort-object-types': [ |
| 66 | + 'error', |
88 | 67 | { |
89 | | - type: "line-length", |
90 | | - order: "asc", |
91 | | - }, |
| 68 | + type: 'line-length', |
| 69 | + order: 'asc' |
| 70 | + } |
92 | 71 | ], |
93 | | - "perfectionist/sort-array-includes": [ |
94 | | - "error", |
| 72 | + 'perfectionist/sort-array-includes': [ |
| 73 | + 'error', |
95 | 74 | { |
96 | | - type: "line-length", |
97 | | - order: "asc", |
98 | | - }, |
| 75 | + type: 'line-length', |
| 76 | + order: 'asc' |
| 77 | + } |
99 | 78 | ], |
100 | | - "perfectionist/sort-classes": [ |
101 | | - "error", |
| 79 | + 'perfectionist/sort-classes': [ |
| 80 | + 'error', |
102 | 81 | { |
103 | | - type: "line-length", |
104 | | - order: "asc", |
105 | | - }, |
| 82 | + type: 'line-length', |
| 83 | + order: 'asc' |
| 84 | + } |
106 | 85 | ], |
107 | | - "perfectionist/sort-enums": [ |
108 | | - "error", |
| 86 | + 'perfectionist/sort-enums': [ |
| 87 | + 'error', |
109 | 88 | { |
110 | | - type: "line-length", |
111 | | - order: "asc", |
112 | | - }, |
| 89 | + type: 'line-length', |
| 90 | + order: 'asc' |
| 91 | + } |
113 | 92 | ], |
114 | | - "perfectionist/sort-exports": [ |
115 | | - "error", |
| 93 | + 'perfectionist/sort-exports': [ |
| 94 | + 'error', |
116 | 95 | { |
117 | | - type: "line-length", |
118 | | - order: "asc", |
119 | | - }, |
| 96 | + type: 'line-length', |
| 97 | + order: 'asc' |
| 98 | + } |
120 | 99 | ], |
121 | | - "perfectionist/sort-interfaces": [ |
122 | | - "error", |
| 100 | + 'perfectionist/sort-interfaces': [ |
| 101 | + 'error', |
123 | 102 | { |
124 | | - type: "line-length", |
125 | | - order: "asc", |
126 | | - }, |
| 103 | + type: 'line-length', |
| 104 | + order: 'asc', |
| 105 | + 'partition-by-new-line': true |
| 106 | + } |
127 | 107 | ], |
128 | | - "perfectionist/sort-jsx-props": [ |
129 | | - "error", |
| 108 | + 'perfectionist/sort-jsx-props': [ |
| 109 | + 'error', |
130 | 110 | { |
131 | | - type: "line-length", |
132 | | - order: "asc", |
133 | | - }, |
| 111 | + type: 'line-length', |
| 112 | + order: 'asc' |
| 113 | + } |
134 | 114 | ], |
135 | | - "perfectionist/sort-map-elements": [ |
136 | | - "error", |
| 115 | + 'perfectionist/sort-map-elements': [ |
| 116 | + 'error', |
137 | 117 | { |
138 | | - type: "line-length", |
139 | | - order: "asc", |
140 | | - }, |
| 118 | + type: 'line-length', |
| 119 | + order: 'asc' |
| 120 | + } |
141 | 121 | ], |
142 | | - "perfectionist/sort-named-exports": [ |
143 | | - "error", |
| 122 | + 'perfectionist/sort-named-exports': [ |
| 123 | + 'error', |
144 | 124 | { |
145 | | - type: "line-length", |
146 | | - order: "asc", |
147 | | - }, |
| 125 | + type: 'line-length', |
| 126 | + order: 'asc' |
| 127 | + } |
148 | 128 | ], |
149 | | - "perfectionist/sort-named-imports": [ |
150 | | - "error", |
| 129 | + 'perfectionist/sort-named-imports': [ |
| 130 | + 'error', |
151 | 131 | { |
152 | | - type: "line-length", |
153 | | - order: "asc", |
154 | | - }, |
| 132 | + type: 'line-length', |
| 133 | + order: 'asc' |
| 134 | + } |
155 | 135 | ], |
156 | | - "perfectionist/sort-imports": [ |
157 | | - "error", |
| 136 | + 'perfectionist/sort-imports': [ |
| 137 | + 'error', |
158 | 138 | { |
159 | | - type: "line-length", |
160 | | - order: "asc", |
| 139 | + type: 'line-length', |
| 140 | + order: 'asc', |
161 | 141 | groups: [ |
162 | | - ["type", "builtin", "external", "unknown"], |
163 | | - ["internal-type", "internal"], |
164 | | - [ |
165 | | - "parent-type", |
166 | | - "sibling-type", |
167 | | - "index-type", |
168 | | - "parent", |
169 | | - "sibling", |
170 | | - "index", |
171 | | - "object", |
172 | | - ], |
173 | | - ], |
174 | | - }, |
| 142 | + ['type', 'builtin', 'external', 'unknown'], |
| 143 | + ['internal-type', 'internal'], |
| 144 | + ['parent-type', 'sibling-type', 'index-type', 'parent', 'sibling', 'index', 'object'] |
| 145 | + ] |
| 146 | + } |
175 | 147 | ], |
176 | | - "perfectionist/sort-object-types": [ |
177 | | - "error", |
| 148 | + 'perfectionist/sort-object-types': [ |
| 149 | + 'error', |
178 | 150 | { |
179 | | - type: "line-length", |
180 | | - order: "asc", |
181 | | - }, |
| 151 | + type: 'line-length', |
| 152 | + order: 'asc', |
| 153 | + 'partition-by-new-line': true |
| 154 | + } |
182 | 155 | ], |
183 | | - "perfectionist/sort-objects": [ |
184 | | - "error", |
| 156 | + 'perfectionist/sort-objects': [ |
| 157 | + 'error', |
185 | 158 | { |
186 | | - type: "line-length", |
187 | | - order: "asc", |
188 | | - "partition-by-comment": true, |
189 | | - }, |
| 159 | + type: 'line-length', |
| 160 | + order: 'asc', |
| 161 | + 'partition-by-comment': true, |
| 162 | + 'partition-by-new-line': true |
| 163 | + } |
190 | 164 | ], |
191 | | - "perfectionist/sort-union-types": [ |
192 | | - "error", |
| 165 | + 'perfectionist/sort-union-types': [ |
| 166 | + 'error', |
193 | 167 | { |
194 | | - type: "line-length", |
195 | | - order: "asc", |
196 | | - }, |
197 | | - ], |
198 | | - }, |
199 | | -}; |
| 168 | + type: 'line-length', |
| 169 | + order: 'asc' |
| 170 | + } |
| 171 | + ] |
| 172 | + } |
| 173 | +} |
0 commit comments