ultracite 3.2.5 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eslint.config.d.mts +685 -0
- package/dist/eslint.config.mjs +1 -0
- package/package.json +11 -2
- package/.gitattributes +0 -2
- package/.github/FUNDING.yml +0 -1
- package/.github/workflows/push.yaml +0 -45
- package/.vscode/settings.json +0 -19
- package/CHANGELOG.md +0 -1400
- package/SECURITY.md +0 -9
- package/eslint.config.mjs +0 -173
- package/prettier.js +0 -13
- package/rules/cypress.mjs +0 -17
- package/rules/eslint-typescript.mjs +0 -43
- package/rules/eslint.mjs +0 -189
- package/rules/import.mjs +0 -44
- package/rules/jest.mjs +0 -17
- package/rules/jsx-a11y.mjs +0 -27
- package/rules/n.mjs +0 -24
- package/rules/next.mjs +0 -17
- package/rules/prettier.mjs +0 -5
- package/rules/promise.mjs +0 -20
- package/rules/react.mjs +0 -46
- package/rules/reactHooks.mjs +0 -23
- package/rules/storybook.mjs +0 -17
- package/rules/tailwindcss.mjs +0 -22
- package/rules/typescript.mjs +0 -62
- package/rules/unused-imports.mjs +0 -17
- package/stylelint.js +0 -35
- package/test.css +0 -7
- package/test.tsx +0 -11
- package/tsconfig.json +0 -10
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
import plugin from 'eslint-plugin-react';
|
|
2
|
+
import reactHooks, { rules as rules$a } from 'eslint-plugin-react-hooks';
|
|
3
|
+
import typescript from '@typescript-eslint/eslint-plugin';
|
|
4
|
+
import plugin$1 from 'eslint-plugin-jsx-a11y';
|
|
5
|
+
import * as importPlugin from 'eslint-plugin-import';
|
|
6
|
+
import { rules as rules$b } from 'eslint-plugin-import';
|
|
7
|
+
import plugin$2 from 'eslint-plugin-jest';
|
|
8
|
+
import plugin$3 from 'eslint-plugin-promise';
|
|
9
|
+
import plugin$4 from 'eslint-plugin-n';
|
|
10
|
+
import plugin$5 from '@next/eslint-plugin-next';
|
|
11
|
+
import globals from 'globals';
|
|
12
|
+
import prettier from 'eslint-plugin-prettier';
|
|
13
|
+
import plugin$6 from 'eslint-plugin-cypress';
|
|
14
|
+
import plugin$7 from 'eslint-plugin-storybook';
|
|
15
|
+
import plugin$8 from 'eslint-plugin-unused-imports';
|
|
16
|
+
import * as importTypescriptResolver from 'eslint-import-resolver-typescript';
|
|
17
|
+
import eslintPrettier from 'eslint-config-prettier';
|
|
18
|
+
import * as typescriptParser from '@typescript-eslint/parser';
|
|
19
|
+
|
|
20
|
+
const config$f = {
|
|
21
|
+
// ESLint Possible Problems: These rules relate to possible logic errors in code
|
|
22
|
+
'array-callback-return': 'error',
|
|
23
|
+
'constructor-super': 'error',
|
|
24
|
+
'for-direction': 'error',
|
|
25
|
+
'getter-return': 'error',
|
|
26
|
+
'no-async-promise-executor': 'error',
|
|
27
|
+
'no-await-in-loop': 'error',
|
|
28
|
+
'no-class-assign': 'error',
|
|
29
|
+
'no-compare-neg-zero': 'error',
|
|
30
|
+
'no-cond-assign': 'error',
|
|
31
|
+
'no-const-assign': 'error',
|
|
32
|
+
'no-constant-condition': 'error',
|
|
33
|
+
'no-constructor-return': 'error',
|
|
34
|
+
'no-control-regex': 'error',
|
|
35
|
+
'no-debugger': 'error',
|
|
36
|
+
'no-dupe-args': 'error',
|
|
37
|
+
'no-dupe-else-if': 'error',
|
|
38
|
+
'no-dupe-keys': 'error',
|
|
39
|
+
'no-duplicate-case': 'error',
|
|
40
|
+
'no-empty-character-class': 'error',
|
|
41
|
+
'no-empty-pattern': 'error',
|
|
42
|
+
'no-ex-assign': 'error',
|
|
43
|
+
'no-fallthrough': 'error',
|
|
44
|
+
'no-func-assign': 'error',
|
|
45
|
+
'no-import-assign': 'error',
|
|
46
|
+
'no-inner-declarations': 'error',
|
|
47
|
+
'no-invalid-regexp': 'error',
|
|
48
|
+
'no-irregular-whitespace': 'error',
|
|
49
|
+
'no-misleading-character-class': 'error',
|
|
50
|
+
'no-new-symbol': 'error',
|
|
51
|
+
'no-obj-calls': 'error',
|
|
52
|
+
'no-promise-executor-return': 'error',
|
|
53
|
+
'no-prototype-builtins': 'error',
|
|
54
|
+
'no-self-assign': 'error',
|
|
55
|
+
'no-self-compare': 'error',
|
|
56
|
+
'no-setter-return': 'error',
|
|
57
|
+
'no-sparse-arrays': 'error',
|
|
58
|
+
'no-template-curly-in-string': 'error',
|
|
59
|
+
'no-this-before-super': 'error',
|
|
60
|
+
'no-undef': 'error',
|
|
61
|
+
'no-unmodified-loop-condition': 'error',
|
|
62
|
+
'no-unreachable': 'error',
|
|
63
|
+
'no-unreachable-loop': 'error',
|
|
64
|
+
'no-unsafe-finally': 'error',
|
|
65
|
+
'no-unsafe-negation': 'error',
|
|
66
|
+
'no-unsafe-optional-chaining': 'error',
|
|
67
|
+
'no-unused-private-class-members': 'off',
|
|
68
|
+
'no-useless-backreference': 'error',
|
|
69
|
+
'require-atomic-updates': 'error',
|
|
70
|
+
'use-isnan': 'error',
|
|
71
|
+
'valid-typeof': 'error',
|
|
72
|
+
|
|
73
|
+
// ESLint Suggestions: These rules suggest alternate ways of doing things
|
|
74
|
+
'accessor-pairs': 'error',
|
|
75
|
+
'arrow-body-style': 'error',
|
|
76
|
+
'block-scoped-var': 'error',
|
|
77
|
+
'capitalized-comments': 'off',
|
|
78
|
+
'class-methods-use-this': 'error',
|
|
79
|
+
complexity: 'off',
|
|
80
|
+
'consistent-return': 'error',
|
|
81
|
+
'consistent-this': 'error',
|
|
82
|
+
curly: 'error',
|
|
83
|
+
'default-case': 'error',
|
|
84
|
+
'default-case-last': 'error',
|
|
85
|
+
eqeqeq: 'error',
|
|
86
|
+
'func-name-matching': 'error',
|
|
87
|
+
'func-names': 'error',
|
|
88
|
+
'func-style': 'error',
|
|
89
|
+
'grouped-accessor-pairs': 'error',
|
|
90
|
+
'guard-for-in': 'error',
|
|
91
|
+
'id-denylist': 'error',
|
|
92
|
+
'id-length': ['error', { exceptions: ['x', 'y', 'z'] }],
|
|
93
|
+
'id-match': 'error',
|
|
94
|
+
'max-classes-per-file': 'error',
|
|
95
|
+
'max-depth': 'error',
|
|
96
|
+
'max-lines': 'off',
|
|
97
|
+
'max-lines-per-function': 'off',
|
|
98
|
+
'max-nested-callbacks': 'error',
|
|
99
|
+
'max-params': 'off',
|
|
100
|
+
'max-statements': 'off',
|
|
101
|
+
'multiline-comment-style': 'error',
|
|
102
|
+
'new-cap': 'error',
|
|
103
|
+
'no-alert': 'error',
|
|
104
|
+
'no-bitwise': 'error',
|
|
105
|
+
'no-caller': 'error',
|
|
106
|
+
'no-case-declarations': 'error',
|
|
107
|
+
'no-console': 'error',
|
|
108
|
+
'no-continue': 'error',
|
|
109
|
+
'no-delete-var': 'error',
|
|
110
|
+
'no-div-regex': 'error',
|
|
111
|
+
'no-else-return': 'error',
|
|
112
|
+
'no-empty': 'error',
|
|
113
|
+
'no-eq-null': 'error',
|
|
114
|
+
'no-eval': 'error',
|
|
115
|
+
'no-extend-native': 'error',
|
|
116
|
+
'no-extra-bind': 'error',
|
|
117
|
+
'no-extra-boolean-cast': 'error',
|
|
118
|
+
'no-extra-label': 'error',
|
|
119
|
+
'no-global-assign': 'error',
|
|
120
|
+
'no-implicit-coercion': 'error',
|
|
121
|
+
'no-implicit-globals': 'error',
|
|
122
|
+
'no-inline-comments': 'error',
|
|
123
|
+
'no-iterator': 'error',
|
|
124
|
+
'no-label-var': 'error',
|
|
125
|
+
'no-labels': 'error',
|
|
126
|
+
'no-lone-blocks': 'error',
|
|
127
|
+
'no-lonely-if': 'error',
|
|
128
|
+
'no-multi-assign': 'error',
|
|
129
|
+
'no-multi-str': 'error',
|
|
130
|
+
'no-negated-condition': 'error',
|
|
131
|
+
'no-nested-ternary': 'error',
|
|
132
|
+
'no-new': 'error',
|
|
133
|
+
'no-new-func': 'error',
|
|
134
|
+
'no-new-object': 'error',
|
|
135
|
+
'no-new-wrappers': 'error',
|
|
136
|
+
'no-nonoctal-decimal-escape': 'error',
|
|
137
|
+
'no-octal': 'error',
|
|
138
|
+
'no-octal-escape': 'error',
|
|
139
|
+
'no-param-reassign': 'error',
|
|
140
|
+
'no-plusplus': 'error',
|
|
141
|
+
'no-proto': 'error',
|
|
142
|
+
'no-regex-spaces': 'error',
|
|
143
|
+
'no-restricted-exports': 'error',
|
|
144
|
+
'no-restricted-globals': 'error',
|
|
145
|
+
'no-restricted-properties': 'error',
|
|
146
|
+
'no-restricted-syntax': 'error',
|
|
147
|
+
'no-return-assign': 'error',
|
|
148
|
+
'no-script-url': 'error',
|
|
149
|
+
'no-sequences': 'error',
|
|
150
|
+
'no-shadow-restricted-names': 'error',
|
|
151
|
+
'no-ternary': 'off',
|
|
152
|
+
'no-undef-init': 'error',
|
|
153
|
+
'no-undefined': 'off',
|
|
154
|
+
'no-underscore-dangle': 'error',
|
|
155
|
+
'no-unneeded-ternary': 'error',
|
|
156
|
+
'no-unused-labels': 'error',
|
|
157
|
+
'no-useless-call': 'error',
|
|
158
|
+
'no-useless-catch': 'error',
|
|
159
|
+
'no-useless-computed-key': 'error',
|
|
160
|
+
'no-useless-concat': 'error',
|
|
161
|
+
'no-useless-escape': 'error',
|
|
162
|
+
'no-useless-rename': 'error',
|
|
163
|
+
'no-useless-return': 'error',
|
|
164
|
+
'no-var': 'error',
|
|
165
|
+
'no-void': 'error',
|
|
166
|
+
'no-warning-comments': 'error',
|
|
167
|
+
'no-with': 'error',
|
|
168
|
+
'object-shorthand': 'error',
|
|
169
|
+
'one-var': 'off',
|
|
170
|
+
'operator-assignment': 'error',
|
|
171
|
+
'prefer-arrow-callback': 'error',
|
|
172
|
+
'prefer-const': 'error',
|
|
173
|
+
'prefer-destructuring': [
|
|
174
|
+
'error',
|
|
175
|
+
{
|
|
176
|
+
array: false,
|
|
177
|
+
object: true,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
'prefer-exponentiation-operator': 'error',
|
|
181
|
+
'prefer-named-capture-group': 'error',
|
|
182
|
+
'prefer-numeric-literals': 'error',
|
|
183
|
+
'prefer-object-spread': 'error',
|
|
184
|
+
'prefer-promise-reject-errors': 'error',
|
|
185
|
+
'prefer-regex-literals': 'error',
|
|
186
|
+
'prefer-rest-params': 'error',
|
|
187
|
+
'prefer-spread': 'error',
|
|
188
|
+
'prefer-template': 'error',
|
|
189
|
+
radix: 'error',
|
|
190
|
+
'require-unicode-regexp': 'error',
|
|
191
|
+
'require-yield': 'error',
|
|
192
|
+
|
|
193
|
+
// https://github.com/eslint/eslint/issues/11542
|
|
194
|
+
'sort-imports': 'off',
|
|
195
|
+
|
|
196
|
+
'sort-keys': 'off',
|
|
197
|
+
'sort-vars': 'off',
|
|
198
|
+
'spaced-comment': 'error',
|
|
199
|
+
strict: 'error',
|
|
200
|
+
'symbol-description': 'error',
|
|
201
|
+
'vars-on-top': 'error',
|
|
202
|
+
yoda: 'error',
|
|
203
|
+
|
|
204
|
+
// ESLint Layout & Formatting: These rules care about how the code looks rather than how it executes
|
|
205
|
+
'line-comment-position': 'error',
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
const { rules: rules$9 } = plugin;
|
|
209
|
+
|
|
210
|
+
const availableKeys$b = Object.keys(rules$9).filter(
|
|
211
|
+
(key) => !rules$9[key].meta.deprecated
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
const baseRules$b = Object.fromEntries(
|
|
215
|
+
availableKeys$b.map((key) => [`react/${key}`, 'error'])
|
|
216
|
+
);
|
|
217
|
+
|
|
218
|
+
const overrideRules$b = {
|
|
219
|
+
'react/forbid-component-props': 'off',
|
|
220
|
+
'react/function-component-definition': [
|
|
221
|
+
'error',
|
|
222
|
+
{
|
|
223
|
+
namedComponents: 'arrow-function',
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
'react/no-array-index-key': 'off',
|
|
227
|
+
'react/no-arrow-function-lifecycle': 'off',
|
|
228
|
+
'react/no-invalid-html-attribute': 'off',
|
|
229
|
+
'react/no-multi-comp': 'off',
|
|
230
|
+
'react/no-unused-class-component-methods': 'off',
|
|
231
|
+
'react/react-in-jsx-scope': 'off',
|
|
232
|
+
'react/require-default-props': 'off',
|
|
233
|
+
'react/jsx-filename-extension': [
|
|
234
|
+
'error',
|
|
235
|
+
{
|
|
236
|
+
extensions: ['.tsx'],
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
'react/jsx-max-depth': 'off',
|
|
240
|
+
'react/jsx-max-props-per-line': 'off',
|
|
241
|
+
'react/jsx-newline': 'off',
|
|
242
|
+
'react/jsx-no-bind': 'off',
|
|
243
|
+
'react/jsx-no-literals': 'off',
|
|
244
|
+
'react/jsx-one-expression-per-line': 'off',
|
|
245
|
+
'react/jsx-props-no-spreading': 'off',
|
|
246
|
+
'react/jsx-sort-props': 'off',
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const config$e = Object.assign(baseRules$b, overrideRules$b);
|
|
250
|
+
|
|
251
|
+
const availableKeys$a = Object.keys(rules$a).filter(
|
|
252
|
+
(key) => !rules$a[key].meta.deprecated
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
const baseRules$a = Object.fromEntries(
|
|
256
|
+
availableKeys$a.map((key) => [`react-hooks/${key}`, 'error'])
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
const overrideRules$a = {
|
|
260
|
+
'react-hooks/exhaustive-deps': [
|
|
261
|
+
'error',
|
|
262
|
+
{
|
|
263
|
+
// Add support for useAsync by react-use
|
|
264
|
+
additionalHooks: '(useAsync)',
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
const config$d = Object.assign(baseRules$a, overrideRules$a);
|
|
270
|
+
|
|
271
|
+
const { rules: rules$8 } = typescript;
|
|
272
|
+
|
|
273
|
+
const availableKeys$9 = Object.keys(rules$8).filter(
|
|
274
|
+
(key) => !rules$8[key].meta.deprecated
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
const baseRules$9 = Object.fromEntries(
|
|
278
|
+
availableKeys$9.map((key) => [`@typescript-eslint/${key}`, 'error'])
|
|
279
|
+
);
|
|
280
|
+
|
|
281
|
+
const overrideRules$9 = {
|
|
282
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
283
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
284
|
+
'@typescript-eslint/naming-convention': [
|
|
285
|
+
'error',
|
|
286
|
+
{
|
|
287
|
+
selector: 'default',
|
|
288
|
+
format: ['camelCase', 'PascalCase', 'snake_case'],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
selector: 'objectLiteralProperty',
|
|
292
|
+
format: null,
|
|
293
|
+
modifiers: ['requiresQuotes'],
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
'@typescript-eslint/no-confusing-void-expression': 'off',
|
|
297
|
+
'@typescript-eslint/no-misused-promises': 'off',
|
|
298
|
+
'@typescript-eslint/no-type-alias': 'off',
|
|
299
|
+
'@typescript-eslint/prefer-readonly': 'off',
|
|
300
|
+
'@typescript-eslint/prefer-readonly-parameter-types': 'off',
|
|
301
|
+
'@typescript-eslint/sort-type-union-intersection-members': 'off',
|
|
302
|
+
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
303
|
+
'@typescript-eslint/no-magic-numbers': 'off',
|
|
304
|
+
|
|
305
|
+
// Disabled for Prettier
|
|
306
|
+
'@typescript-eslint/block-spacing': 'off',
|
|
307
|
+
'@typescript-eslint/brace-style': 'off',
|
|
308
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
309
|
+
'@typescript-eslint/comma-spacing': 'off',
|
|
310
|
+
'@typescript-eslint/func-call-spacing': 'off',
|
|
311
|
+
'@typescript-eslint/indent': 'off',
|
|
312
|
+
'@typescript-eslint/key-spacing': 'off',
|
|
313
|
+
'@typescript-eslint/keyword-spacing': 'off',
|
|
314
|
+
'@typescript-eslint/lines-around-comment': 'off',
|
|
315
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
316
|
+
'@typescript-eslint/member-delimiter-style': 'off',
|
|
317
|
+
'@typescript-eslint/no-extra-parens': 'off',
|
|
318
|
+
'@typescript-eslint/object-curly-spacing': 'off',
|
|
319
|
+
'@typescript-eslint/padding-line-between-statements': 'off',
|
|
320
|
+
'@typescript-eslint/quotes': 'off',
|
|
321
|
+
'@typescript-eslint/semi': 'off',
|
|
322
|
+
'@typescript-eslint/space-before-blocks': 'off',
|
|
323
|
+
'@typescript-eslint/space-before-function-paren': 'off',
|
|
324
|
+
'@typescript-eslint/space-infix-ops': 'off',
|
|
325
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
const config$c = Object.assign(baseRules$9, overrideRules$9);
|
|
329
|
+
|
|
330
|
+
const { rules: rules$7 } = plugin$1;
|
|
331
|
+
|
|
332
|
+
const availableKeys$8 = Object.keys(rules$7).filter(
|
|
333
|
+
(key) => !rules$7[key].meta.deprecated
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
const baseRules$8 = Object.fromEntries(
|
|
337
|
+
availableKeys$8.map((key) => [`jsx-a11y/${key}`, 'error'])
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
const overrideRules$8 = {
|
|
341
|
+
'jsx-a11y/no-autofocus': 'off',
|
|
342
|
+
'jsx-a11y/label-has-associated-control': [
|
|
343
|
+
'error',
|
|
344
|
+
{
|
|
345
|
+
labelComponents: ['Label'],
|
|
346
|
+
controlComponents: ['Input', 'Select', 'Textarea', 'Checkbox', 'Radio'],
|
|
347
|
+
depth: 3,
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
const config$b = Object.assign(baseRules$8, overrideRules$8);
|
|
353
|
+
|
|
354
|
+
const availableKeys$7 = Object.keys(rules$b).filter(
|
|
355
|
+
(key) => !rules$b[key].meta.deprecated
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
const baseRules$7 = Object.fromEntries(
|
|
359
|
+
availableKeys$7.map((key) => [`import/${key}`, 'error'])
|
|
360
|
+
);
|
|
361
|
+
|
|
362
|
+
const overrideRules$7 = {
|
|
363
|
+
'import/no-unresolved': 'off',
|
|
364
|
+
'import/no-internal-modules': 'off',
|
|
365
|
+
'import/no-relative-parent-imports': 'off',
|
|
366
|
+
'import/no-named-as-default': 'off',
|
|
367
|
+
'import/exports-last': 'off',
|
|
368
|
+
'import/no-namespace': 'off',
|
|
369
|
+
'import/extensions': 'off',
|
|
370
|
+
'import/order': [
|
|
371
|
+
'error',
|
|
372
|
+
{
|
|
373
|
+
groups: [
|
|
374
|
+
'builtin',
|
|
375
|
+
'external',
|
|
376
|
+
'internal',
|
|
377
|
+
'parent',
|
|
378
|
+
'sibling',
|
|
379
|
+
'index',
|
|
380
|
+
'object',
|
|
381
|
+
'type',
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
'import/prefer-default-export': 'off',
|
|
386
|
+
'import/max-dependencies': 'off',
|
|
387
|
+
'import/no-unassigned-import': 'off',
|
|
388
|
+
'import/no-default-export': 'off',
|
|
389
|
+
'import/no-named-export': 'off',
|
|
390
|
+
'import/group-exports': 'off',
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const config$a = Object.assign(baseRules$7, overrideRules$7);
|
|
394
|
+
|
|
395
|
+
const { rules: rules$6 } = plugin$2;
|
|
396
|
+
|
|
397
|
+
const availableKeys$6 = Object.keys(rules$6).filter(
|
|
398
|
+
(key) => !rules$6[key].meta.deprecated
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
const baseRules$6 = Object.fromEntries(
|
|
402
|
+
availableKeys$6.map((key) => [`jest/${key}`, 'error'])
|
|
403
|
+
);
|
|
404
|
+
|
|
405
|
+
const overrideRules$6 = {};
|
|
406
|
+
|
|
407
|
+
const config$9 = Object.assign(baseRules$6, overrideRules$6);
|
|
408
|
+
|
|
409
|
+
const { rules: rules$5 } = plugin$3;
|
|
410
|
+
|
|
411
|
+
const availableKeys$5 = Object.keys(rules$5).filter(
|
|
412
|
+
(key) => !rules$5[key].meta.deprecated
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
const baseRules$5 = Object.fromEntries(
|
|
416
|
+
availableKeys$5.map((key) => [`promise/${key}`, 'error'])
|
|
417
|
+
);
|
|
418
|
+
|
|
419
|
+
const overrideRules$5 = {
|
|
420
|
+
'promise/catch-or-return': ['error', { allowFinally: true }],
|
|
421
|
+
'promise/no-native': 'off',
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
const config$8 = Object.assign(baseRules$5, overrideRules$5);
|
|
425
|
+
|
|
426
|
+
const { rules: rules$4 } = plugin$4;
|
|
427
|
+
|
|
428
|
+
const availableKeys$4 = Object.keys(rules$4).filter(
|
|
429
|
+
(key) => !rules$4[key].meta.deprecated
|
|
430
|
+
);
|
|
431
|
+
|
|
432
|
+
const baseRules$4 = Object.fromEntries(
|
|
433
|
+
availableKeys$4.map((key) => [`n/${key}`, 'error'])
|
|
434
|
+
);
|
|
435
|
+
|
|
436
|
+
const overrideRules$4 = {
|
|
437
|
+
'n/no-missing-import': 'off',
|
|
438
|
+
'n/no-unsupported-features/es-builtins': 'off',
|
|
439
|
+
'n/no-unsupported-features/es-syntax': 'off',
|
|
440
|
+
'n/no-unsupported-features/node-builtins': 'off',
|
|
441
|
+
'n/file-extension-in-import': 'off',
|
|
442
|
+
'n/no-process-env': 'off',
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
const config$7 = Object.assign(baseRules$4, overrideRules$4);
|
|
446
|
+
|
|
447
|
+
const { rules: rules$3 } = plugin$5;
|
|
448
|
+
|
|
449
|
+
const availableKeys$3 = Object.keys(rules$3).filter(
|
|
450
|
+
(key) => !rules$3[key].meta.deprecated
|
|
451
|
+
);
|
|
452
|
+
|
|
453
|
+
const baseRules$3 = Object.fromEntries(
|
|
454
|
+
availableKeys$3.map((key) => [`@next/next/${key}`, 'error'])
|
|
455
|
+
);
|
|
456
|
+
|
|
457
|
+
const overrideRules$3 = {};
|
|
458
|
+
|
|
459
|
+
const config$6 = Object.assign(baseRules$3, overrideRules$3);
|
|
460
|
+
|
|
461
|
+
const config$5 = {
|
|
462
|
+
'prettier/prettier': 'error',
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
const config$4 = {
|
|
466
|
+
// ESLint Disabled for Typescript-ESLint
|
|
467
|
+
'brace-style': 'off',
|
|
468
|
+
camelcase: 'off',
|
|
469
|
+
'comma-dangle': 'off',
|
|
470
|
+
'comma-spacing': 'off',
|
|
471
|
+
'default-param-last': 'off',
|
|
472
|
+
'dot-notation': 'off',
|
|
473
|
+
'func-call-spacing': 'off',
|
|
474
|
+
indent: 'off',
|
|
475
|
+
'init-declarations': 'off',
|
|
476
|
+
'keyword-spacing': 'off',
|
|
477
|
+
'lines-between-class-members': 'off',
|
|
478
|
+
'no-array-constructor': 'off',
|
|
479
|
+
'no-dupe-class-members': 'off',
|
|
480
|
+
'no-duplicate-imports': 'off',
|
|
481
|
+
'no-empty-function': 'off',
|
|
482
|
+
'no-extra-parens': 'off',
|
|
483
|
+
'no-extra-semi': 'off',
|
|
484
|
+
'no-implied-eval': 'off',
|
|
485
|
+
'no-invalid-this': 'off',
|
|
486
|
+
'no-loop-func': 'off',
|
|
487
|
+
'no-loss-of-precision': 'off',
|
|
488
|
+
'no-magic-numbers': 'off',
|
|
489
|
+
'no-redeclare': 'off',
|
|
490
|
+
'no-restricted-imports': 'off',
|
|
491
|
+
'no-shadow': 'off',
|
|
492
|
+
'no-throw-literal': 'off',
|
|
493
|
+
'no-unused-expressions': 'off',
|
|
494
|
+
'no-unused-vars': 'off',
|
|
495
|
+
'no-use-before-define': 'off',
|
|
496
|
+
'no-useless-constructor': 'off',
|
|
497
|
+
'object-curly-spacing': 'off',
|
|
498
|
+
'padding-line-between-statements': 'off',
|
|
499
|
+
quotes: 'off',
|
|
500
|
+
'require-await': 'off',
|
|
501
|
+
'no-return-await': 'off',
|
|
502
|
+
semi: 'off',
|
|
503
|
+
'space-before-function-paren': 'off',
|
|
504
|
+
'space-infix-ops': 'off',
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
const { rules: rules$2 } = plugin$6;
|
|
508
|
+
|
|
509
|
+
const availableKeys$2 = Object.keys(rules$2).filter(
|
|
510
|
+
(key) => !rules$2[key].meta.deprecated
|
|
511
|
+
);
|
|
512
|
+
|
|
513
|
+
const baseRules$2 = Object.fromEntries(
|
|
514
|
+
availableKeys$2.map((key) => [`cypress/${key}`, 'error'])
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
const overrideRules$2 = {};
|
|
518
|
+
|
|
519
|
+
const config$3 = Object.assign(baseRules$2, overrideRules$2);
|
|
520
|
+
|
|
521
|
+
const { rules: rules$1 } = plugin$7;
|
|
522
|
+
|
|
523
|
+
const availableKeys$1 = Object.keys(rules$1).filter(
|
|
524
|
+
(key) => !rules$1[key].meta.deprecated
|
|
525
|
+
);
|
|
526
|
+
|
|
527
|
+
const baseRules$1 = Object.fromEntries(
|
|
528
|
+
availableKeys$1.map((key) => [`storybook/${key}`, 'error'])
|
|
529
|
+
);
|
|
530
|
+
|
|
531
|
+
const overrideRules$1 = {};
|
|
532
|
+
|
|
533
|
+
const config$2 = Object.assign(baseRules$1, overrideRules$1);
|
|
534
|
+
|
|
535
|
+
const { rules } = plugin$8;
|
|
536
|
+
|
|
537
|
+
const availableKeys = Object.keys(rules).filter(
|
|
538
|
+
(key) => !rules[key].meta.deprecated
|
|
539
|
+
);
|
|
540
|
+
|
|
541
|
+
const baseRules = Object.fromEntries(
|
|
542
|
+
availableKeys.map((key) => [`unused-imports/${key}`, 'error'])
|
|
543
|
+
);
|
|
544
|
+
|
|
545
|
+
const overrideRules = {};
|
|
546
|
+
|
|
547
|
+
const config$1 = Object.assign(baseRules, overrideRules);
|
|
548
|
+
|
|
549
|
+
/* eslint-disable n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
// Patch AudioWorkletGlobalScope
|
|
553
|
+
const browserGlobals = { ...globals.browser };
|
|
554
|
+
delete browserGlobals['AudioWorkletGlobalScope '];
|
|
555
|
+
|
|
556
|
+
const config = [
|
|
557
|
+
importPlugin.configs.typescript,
|
|
558
|
+
{
|
|
559
|
+
languageOptions: {
|
|
560
|
+
sourceType: 'module',
|
|
561
|
+
globals: {
|
|
562
|
+
...browserGlobals,
|
|
563
|
+
...globals.node,
|
|
564
|
+
},
|
|
565
|
+
parserOptions: {
|
|
566
|
+
ecmaVersion: 'latest',
|
|
567
|
+
sourceType: 'module',
|
|
568
|
+
ecmaFeatures: {
|
|
569
|
+
jsx: true,
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
files: [
|
|
574
|
+
'**/*.js',
|
|
575
|
+
'**/*.jsx',
|
|
576
|
+
'**/*.ts',
|
|
577
|
+
'**/*.tsx',
|
|
578
|
+
'**/*.json',
|
|
579
|
+
'**/*.mjs',
|
|
580
|
+
'**/*.cjs',
|
|
581
|
+
],
|
|
582
|
+
plugins: {
|
|
583
|
+
prettier,
|
|
584
|
+
react: plugin,
|
|
585
|
+
'react-hooks': reactHooks,
|
|
586
|
+
'jsx-a11y': plugin$1,
|
|
587
|
+
import: importPlugin,
|
|
588
|
+
promise: plugin$3,
|
|
589
|
+
n: plugin$4,
|
|
590
|
+
'@next/next': plugin$5,
|
|
591
|
+
'unused-imports': plugin$8,
|
|
592
|
+
// tailwindcss,
|
|
593
|
+
},
|
|
594
|
+
rules: {
|
|
595
|
+
...config$f,
|
|
596
|
+
...config$e,
|
|
597
|
+
...config$d,
|
|
598
|
+
...config$b,
|
|
599
|
+
...config$a,
|
|
600
|
+
...config$8,
|
|
601
|
+
...config$7,
|
|
602
|
+
...config$6,
|
|
603
|
+
...config$5,
|
|
604
|
+
...eslintPrettier.rules,
|
|
605
|
+
...config$1,
|
|
606
|
+
// ...tailwindcssRules,
|
|
607
|
+
},
|
|
608
|
+
|
|
609
|
+
settings: {
|
|
610
|
+
react: {
|
|
611
|
+
version: 'detect',
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
// https://github.com/import-js/eslint-plugin-import/issues/2556#issuecomment-1419518561
|
|
615
|
+
'import/parsers': {
|
|
616
|
+
espree: ['.js', '.cjs', '.mjs', '.jsx', '.ts', '.tsx'],
|
|
617
|
+
},
|
|
618
|
+
'import/resolver': {
|
|
619
|
+
typescript: true,
|
|
620
|
+
node: true,
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
626
|
+
languageOptions: {
|
|
627
|
+
parser: typescriptParser,
|
|
628
|
+
parserOptions: {
|
|
629
|
+
project: './tsconfig.json',
|
|
630
|
+
},
|
|
631
|
+
},
|
|
632
|
+
plugins: {
|
|
633
|
+
'@typescript-eslint': typescript,
|
|
634
|
+
'import/typescript': importTypescriptResolver,
|
|
635
|
+
},
|
|
636
|
+
rules: {
|
|
637
|
+
...config$4,
|
|
638
|
+
...config$c,
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
files: ['**/*.test.js', '**/*.test.jsx', 'tests/**/*.js', 'tests/**/*.jsx'],
|
|
643
|
+
languageOptions: {
|
|
644
|
+
globals: {
|
|
645
|
+
...globals.jest,
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
plugins: {
|
|
649
|
+
jest: plugin$2,
|
|
650
|
+
},
|
|
651
|
+
rules: {
|
|
652
|
+
...config$9,
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
files: ['**/*.cy.js', '**/*.cy.jsx'],
|
|
657
|
+
languageOptions: {
|
|
658
|
+
globals: {
|
|
659
|
+
...globals.cypress,
|
|
660
|
+
},
|
|
661
|
+
},
|
|
662
|
+
plugins: {
|
|
663
|
+
cypress: plugin$6,
|
|
664
|
+
},
|
|
665
|
+
rules: {
|
|
666
|
+
...config$3,
|
|
667
|
+
},
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
files: [
|
|
671
|
+
'**/*.stories.js',
|
|
672
|
+
'**/*.stories.jsx',
|
|
673
|
+
'**/*.stories.ts',
|
|
674
|
+
'**/*.stories.tsx',
|
|
675
|
+
],
|
|
676
|
+
plugins: {
|
|
677
|
+
storybook: plugin$7,
|
|
678
|
+
},
|
|
679
|
+
rules: {
|
|
680
|
+
...config$2,
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
];
|
|
684
|
+
|
|
685
|
+
export { config as default };
|