ultracite 3.6.2 → 3.7.1
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/README.md +26 -4
- package/dist/eslint.config.d.mts +105 -88
- package/dist/eslint.config.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Ultracite is a robust linting preset for modern TypeScript apps. It's comprised
|
|
|
14
14
|
|
|
15
15
|
### ESLint
|
|
16
16
|
|
|
17
|
-
Ultracite uses [ESLint](https://eslint.org/) to enforce code quality and type safety. It includes a wide range of rules to ensure your code is consistent and error-free. Ultracite combines with pre-defined rulesets for ESLint, as well as the following plugins: [Import](https://www.npmjs.com/package/eslint-plugin-import), [jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y), [React](https://www.npmjs.com/package/eslint-plugin-react), [React Hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks), [jest](https://www.npmjs.com/package/eslint-plugin-jest), [promise](https://www.npmjs.com/package/eslint-plugin-promise), [n](https://www.npmjs.com/package/eslint-plugin-n), [Typescript](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin), [Prettier](https://www.npmjs.com/package/eslint-plugin-prettier), [Next.js](https://nextjs.org/docs/basic-features/eslint#eslint-plugin), [Cypress](https://www.npmjs.com/package/eslint-plugin-cypress), [HTML](https://www.npmjs.com/package/eslint-plugin-html), [SonarJS](https://www.npmjs.com/package/eslint-plugin-sonarjs)
|
|
17
|
+
Ultracite uses [ESLint](https://eslint.org/) to enforce code quality and type safety. It includes a wide range of rules to ensure your code is consistent and error-free. Ultracite combines with pre-defined rulesets for ESLint, as well as the following plugins: [Import](https://www.npmjs.com/package/eslint-plugin-import), [jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y), [React](https://www.npmjs.com/package/eslint-plugin-react), [React Hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks), [jest](https://www.npmjs.com/package/eslint-plugin-jest), [promise](https://www.npmjs.com/package/eslint-plugin-promise), [n](https://www.npmjs.com/package/eslint-plugin-n), [Typescript](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin), [Prettier](https://www.npmjs.com/package/eslint-plugin-prettier), [Next.js](https://nextjs.org/docs/basic-features/eslint#eslint-plugin), [Cypress](https://www.npmjs.com/package/eslint-plugin-cypress), [HTML](https://www.npmjs.com/package/eslint-plugin-html), [SonarJS](https://www.npmjs.com/package/eslint-plugin-sonarjs), [Compat](https://www.npmjs.com/package/eslint-plugin-compat) and [Unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn).
|
|
18
18
|
|
|
19
19
|
### Prettier
|
|
20
20
|
|
|
@@ -111,14 +111,37 @@ You can opt-out of certain rules by modifying your `eslint.config.mjs` file. For
|
|
|
111
111
|
```js
|
|
112
112
|
import ultracite from 'ultracite';
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
for (const config of ultracite) {
|
|
115
115
|
config.ignores = config.ignores || [];
|
|
116
116
|
config.ignores.push('./components/ui/**/*');
|
|
117
|
-
}
|
|
117
|
+
}
|
|
118
118
|
|
|
119
119
|
export default ultracite;
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
+
Ultracite also lints the browser compatibility of your code. You can specify which polyfills exist in your project by modifying your `eslint.config.mjs` file. For example, here's how you can add polyfills for Next.js:
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
import ultracite from 'ultracite';
|
|
126
|
+
|
|
127
|
+
for (const item of ultracite) {
|
|
128
|
+
item.settings = item.settings || {};
|
|
129
|
+
item.settings.polyfills = item.settings.polyfills || [];
|
|
130
|
+
|
|
131
|
+
item.settings.polyfills.push(
|
|
132
|
+
// These are from Next.js - https://nextjs.org/docs/architecture/supported-browsers#polyfills
|
|
133
|
+
'fetch',
|
|
134
|
+
'URL',
|
|
135
|
+
'Object.assign',
|
|
136
|
+
|
|
137
|
+
// This one is running on the server
|
|
138
|
+
'URLSearchParams'
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { default } from 'ultracite';
|
|
143
|
+
```
|
|
144
|
+
|
|
122
145
|
## Debugging
|
|
123
146
|
|
|
124
147
|
If you're having issues with Ultracite, you can open the ESLint Output panel in VS Code to see what's going on. Optimally, it should look something like this:
|
|
@@ -137,4 +160,3 @@ If you see any errors, it could be related to peer dependencies or changes in de
|
|
|
137
160
|
- https://github.com/ota-meshi/eslint-plugin-yml
|
|
138
161
|
- https://github.com/mdx-js/eslint-mdx/tree/master/packages/eslint-plugin-mdx
|
|
139
162
|
- https://github.com/eslint/eslint-plugin-markdown
|
|
140
|
-
- https://github.com/sindresorhus/eslint-plugin-unicorn
|
package/dist/eslint.config.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import plugin from 'eslint-plugin-react';
|
|
2
|
-
import reactHooks, { rules as rules$
|
|
2
|
+
import reactHooks, { rules as rules$c } from 'eslint-plugin-react-hooks';
|
|
3
3
|
import typescript from '@typescript-eslint/eslint-plugin';
|
|
4
4
|
import plugin$1 from 'eslint-plugin-jsx-a11y';
|
|
5
5
|
import * as importPlugin from 'eslint-plugin-import';
|
|
6
|
-
import { rules as rules$
|
|
6
|
+
import { rules as rules$d } from 'eslint-plugin-import';
|
|
7
7
|
import plugin$2 from 'eslint-plugin-jest';
|
|
8
8
|
import plugin$3 from 'eslint-plugin-promise';
|
|
9
9
|
import plugin$4 from 'eslint-plugin-n';
|
|
@@ -19,8 +19,9 @@ import compat from 'eslint-plugin-compat';
|
|
|
19
19
|
import eslintPrettier from 'eslint-config-prettier';
|
|
20
20
|
import * as typescriptParser from '@typescript-eslint/parser';
|
|
21
21
|
import plugin$9 from 'eslint-plugin-sonarjs';
|
|
22
|
+
import plugin$a from 'eslint-plugin-unicorn';
|
|
22
23
|
|
|
23
|
-
const config$
|
|
24
|
+
const config$i = {
|
|
24
25
|
// ESLint Possible Problems: These rules relate to possible logic errors in code
|
|
25
26
|
'array-callback-return': 'error',
|
|
26
27
|
'constructor-super': 'error',
|
|
@@ -208,17 +209,17 @@ const config$h = {
|
|
|
208
209
|
'line-comment-position': 'error',
|
|
209
210
|
};
|
|
210
211
|
|
|
211
|
-
const { rules: rules$
|
|
212
|
+
const { rules: rules$b } = plugin;
|
|
212
213
|
|
|
213
|
-
const availableKeys$
|
|
214
|
-
(key) => !rules$
|
|
214
|
+
const availableKeys$d = Object.keys(rules$b).filter(
|
|
215
|
+
(key) => !rules$b[key].meta.deprecated
|
|
215
216
|
);
|
|
216
217
|
|
|
217
|
-
const baseRules$
|
|
218
|
-
availableKeys$
|
|
218
|
+
const baseRules$d = Object.fromEntries(
|
|
219
|
+
availableKeys$d.map((key) => [`react/${key}`, 'error'])
|
|
219
220
|
);
|
|
220
221
|
|
|
221
|
-
const overrideRules$
|
|
222
|
+
const overrideRules$d = {
|
|
222
223
|
'react/forbid-component-props': 'off',
|
|
223
224
|
'react/function-component-definition': [
|
|
224
225
|
'error',
|
|
@@ -249,17 +250,17 @@ const overrideRules$c = {
|
|
|
249
250
|
'react/jsx-sort-props': 'off',
|
|
250
251
|
};
|
|
251
252
|
|
|
252
|
-
const config$
|
|
253
|
+
const config$h = Object.assign(baseRules$d, overrideRules$d);
|
|
253
254
|
|
|
254
|
-
const availableKeys$
|
|
255
|
-
(key) => !rules$
|
|
255
|
+
const availableKeys$c = Object.keys(rules$c).filter(
|
|
256
|
+
(key) => !rules$c[key].meta.deprecated
|
|
256
257
|
);
|
|
257
258
|
|
|
258
|
-
const baseRules$
|
|
259
|
-
availableKeys$
|
|
259
|
+
const baseRules$c = Object.fromEntries(
|
|
260
|
+
availableKeys$c.map((key) => [`react-hooks/${key}`, 'error'])
|
|
260
261
|
);
|
|
261
262
|
|
|
262
|
-
const overrideRules$
|
|
263
|
+
const overrideRules$c = {
|
|
263
264
|
'react-hooks/exhaustive-deps': [
|
|
264
265
|
'error',
|
|
265
266
|
{
|
|
@@ -269,19 +270,19 @@ const overrideRules$b = {
|
|
|
269
270
|
],
|
|
270
271
|
};
|
|
271
272
|
|
|
272
|
-
const config$
|
|
273
|
+
const config$g = Object.assign(baseRules$c, overrideRules$c);
|
|
273
274
|
|
|
274
|
-
const { rules: rules$
|
|
275
|
+
const { rules: rules$a } = typescript;
|
|
275
276
|
|
|
276
|
-
const availableKeys$
|
|
277
|
-
(key) => !rules$
|
|
277
|
+
const availableKeys$b = Object.keys(rules$a).filter(
|
|
278
|
+
(key) => !rules$a[key].meta.deprecated
|
|
278
279
|
);
|
|
279
280
|
|
|
280
|
-
const baseRules$
|
|
281
|
-
availableKeys$
|
|
281
|
+
const baseRules$b = Object.fromEntries(
|
|
282
|
+
availableKeys$b.map((key) => [`@typescript-eslint/${key}`, 'error'])
|
|
282
283
|
);
|
|
283
284
|
|
|
284
|
-
const overrideRules$
|
|
285
|
+
const overrideRules$b = {
|
|
285
286
|
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
286
287
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
287
288
|
'@typescript-eslint/naming-convention': [
|
|
@@ -328,19 +329,19 @@ const overrideRules$a = {
|
|
|
328
329
|
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
329
330
|
};
|
|
330
331
|
|
|
331
|
-
const config$
|
|
332
|
+
const config$f = Object.assign(baseRules$b, overrideRules$b);
|
|
332
333
|
|
|
333
|
-
const { rules: rules$
|
|
334
|
+
const { rules: rules$9 } = plugin$1;
|
|
334
335
|
|
|
335
|
-
const availableKeys$
|
|
336
|
-
(key) => !rules$
|
|
336
|
+
const availableKeys$a = Object.keys(rules$9).filter(
|
|
337
|
+
(key) => !rules$9[key].meta.deprecated
|
|
337
338
|
);
|
|
338
339
|
|
|
339
|
-
const baseRules$
|
|
340
|
-
availableKeys$
|
|
340
|
+
const baseRules$a = Object.fromEntries(
|
|
341
|
+
availableKeys$a.map((key) => [`jsx-a11y/${key}`, 'error'])
|
|
341
342
|
);
|
|
342
343
|
|
|
343
|
-
const overrideRules$
|
|
344
|
+
const overrideRules$a = {
|
|
344
345
|
'jsx-a11y/no-autofocus': 'off',
|
|
345
346
|
'jsx-a11y/label-has-associated-control': [
|
|
346
347
|
'error',
|
|
@@ -352,17 +353,17 @@ const overrideRules$9 = {
|
|
|
352
353
|
],
|
|
353
354
|
};
|
|
354
355
|
|
|
355
|
-
const config$
|
|
356
|
+
const config$e = Object.assign(baseRules$a, overrideRules$a);
|
|
356
357
|
|
|
357
|
-
const availableKeys$
|
|
358
|
-
(key) => !rules$
|
|
358
|
+
const availableKeys$9 = Object.keys(rules$d).filter(
|
|
359
|
+
(key) => !rules$d[key].meta.deprecated
|
|
359
360
|
);
|
|
360
361
|
|
|
361
|
-
const baseRules$
|
|
362
|
-
availableKeys$
|
|
362
|
+
const baseRules$9 = Object.fromEntries(
|
|
363
|
+
availableKeys$9.map((key) => [`import/${key}`, 'error'])
|
|
363
364
|
);
|
|
364
365
|
|
|
365
|
-
const overrideRules$
|
|
366
|
+
const overrideRules$9 = {
|
|
366
367
|
'import/no-unresolved': 'off',
|
|
367
368
|
'import/no-internal-modules': 'off',
|
|
368
369
|
'import/no-relative-parent-imports': 'off',
|
|
@@ -393,50 +394,50 @@ const overrideRules$8 = {
|
|
|
393
394
|
'import/group-exports': 'off',
|
|
394
395
|
};
|
|
395
396
|
|
|
396
|
-
const config$
|
|
397
|
+
const config$d = Object.assign(baseRules$9, overrideRules$9);
|
|
397
398
|
|
|
398
|
-
const { rules: rules$
|
|
399
|
+
const { rules: rules$8 } = plugin$2;
|
|
399
400
|
|
|
400
|
-
const availableKeys$
|
|
401
|
-
(key) => !rules$
|
|
401
|
+
const availableKeys$8 = Object.keys(rules$8).filter(
|
|
402
|
+
(key) => !rules$8[key].meta.deprecated
|
|
402
403
|
);
|
|
403
404
|
|
|
404
|
-
const baseRules$
|
|
405
|
-
availableKeys$
|
|
405
|
+
const baseRules$8 = Object.fromEntries(
|
|
406
|
+
availableKeys$8.map((key) => [`jest/${key}`, 'error'])
|
|
406
407
|
);
|
|
407
408
|
|
|
408
|
-
const overrideRules$
|
|
409
|
+
const overrideRules$8 = {};
|
|
409
410
|
|
|
410
|
-
const config$
|
|
411
|
+
const config$c = Object.assign(baseRules$8, overrideRules$8);
|
|
411
412
|
|
|
412
|
-
const { rules: rules$
|
|
413
|
+
const { rules: rules$7 } = plugin$3;
|
|
413
414
|
|
|
414
|
-
const availableKeys$
|
|
415
|
-
(key) => !rules$
|
|
415
|
+
const availableKeys$7 = Object.keys(rules$7).filter(
|
|
416
|
+
(key) => !rules$7[key].meta.deprecated
|
|
416
417
|
);
|
|
417
418
|
|
|
418
|
-
const baseRules$
|
|
419
|
-
availableKeys$
|
|
419
|
+
const baseRules$7 = Object.fromEntries(
|
|
420
|
+
availableKeys$7.map((key) => [`promise/${key}`, 'error'])
|
|
420
421
|
);
|
|
421
422
|
|
|
422
|
-
const overrideRules$
|
|
423
|
+
const overrideRules$7 = {
|
|
423
424
|
'promise/catch-or-return': ['error', { allowFinally: true }],
|
|
424
425
|
'promise/no-native': 'off',
|
|
425
426
|
};
|
|
426
427
|
|
|
427
|
-
const config$
|
|
428
|
+
const config$b = Object.assign(baseRules$7, overrideRules$7);
|
|
428
429
|
|
|
429
|
-
const { rules: rules$
|
|
430
|
+
const { rules: rules$6 } = plugin$4;
|
|
430
431
|
|
|
431
|
-
const availableKeys$
|
|
432
|
-
(key) => !rules$
|
|
432
|
+
const availableKeys$6 = Object.keys(rules$6).filter(
|
|
433
|
+
(key) => !rules$6[key].meta.deprecated
|
|
433
434
|
);
|
|
434
435
|
|
|
435
|
-
const baseRules$
|
|
436
|
-
availableKeys$
|
|
436
|
+
const baseRules$6 = Object.fromEntries(
|
|
437
|
+
availableKeys$6.map((key) => [`n/${key}`, 'error'])
|
|
437
438
|
);
|
|
438
439
|
|
|
439
|
-
const overrideRules$
|
|
440
|
+
const overrideRules$6 = {
|
|
440
441
|
'n/no-missing-import': 'off',
|
|
441
442
|
'n/no-unsupported-features/es-builtins': 'off',
|
|
442
443
|
'n/no-unsupported-features/es-syntax': 'off',
|
|
@@ -445,27 +446,27 @@ const overrideRules$5 = {
|
|
|
445
446
|
'n/no-process-env': 'off',
|
|
446
447
|
};
|
|
447
448
|
|
|
448
|
-
const config$
|
|
449
|
+
const config$a = Object.assign(baseRules$6, overrideRules$6);
|
|
449
450
|
|
|
450
|
-
const { rules: rules$
|
|
451
|
+
const { rules: rules$5 } = plugin$5;
|
|
451
452
|
|
|
452
|
-
const availableKeys$
|
|
453
|
-
(key) => !rules$
|
|
453
|
+
const availableKeys$5 = Object.keys(rules$5).filter(
|
|
454
|
+
(key) => !rules$5[key].meta.deprecated
|
|
454
455
|
);
|
|
455
456
|
|
|
456
|
-
const baseRules$
|
|
457
|
-
availableKeys$
|
|
457
|
+
const baseRules$5 = Object.fromEntries(
|
|
458
|
+
availableKeys$5.map((key) => [`@next/next/${key}`, 'error'])
|
|
458
459
|
);
|
|
459
460
|
|
|
460
|
-
const overrideRules$
|
|
461
|
+
const overrideRules$5 = {};
|
|
461
462
|
|
|
462
|
-
const config$
|
|
463
|
+
const config$9 = Object.assign(baseRules$5, overrideRules$5);
|
|
463
464
|
|
|
464
|
-
const config$
|
|
465
|
+
const config$8 = {
|
|
465
466
|
'prettier/prettier': 'error',
|
|
466
467
|
};
|
|
467
468
|
|
|
468
|
-
const config$
|
|
469
|
+
const config$7 = {
|
|
469
470
|
// ESLint Disabled for Typescript-ESLint
|
|
470
471
|
'brace-style': 'off',
|
|
471
472
|
camelcase: 'off',
|
|
@@ -507,65 +508,79 @@ const config$6 = {
|
|
|
507
508
|
'space-infix-ops': 'off',
|
|
508
509
|
};
|
|
509
510
|
|
|
510
|
-
const { rules: rules$
|
|
511
|
+
const { rules: rules$4 } = plugin$6;
|
|
512
|
+
|
|
513
|
+
const availableKeys$4 = Object.keys(rules$4).filter(
|
|
514
|
+
(key) => !rules$4[key].meta.deprecated
|
|
515
|
+
);
|
|
516
|
+
|
|
517
|
+
const baseRules$4 = Object.fromEntries(
|
|
518
|
+
availableKeys$4.map((key) => [`cypress/${key}`, 'error'])
|
|
519
|
+
);
|
|
520
|
+
|
|
521
|
+
const overrideRules$4 = {};
|
|
522
|
+
|
|
523
|
+
const config$6 = Object.assign(baseRules$4, overrideRules$4);
|
|
524
|
+
|
|
525
|
+
const { rules: rules$3 } = plugin$7;
|
|
511
526
|
|
|
512
527
|
const availableKeys$3 = Object.keys(rules$3).filter(
|
|
513
528
|
(key) => !rules$3[key].meta.deprecated
|
|
514
529
|
);
|
|
515
530
|
|
|
516
531
|
const baseRules$3 = Object.fromEntries(
|
|
517
|
-
availableKeys$3.map((key) => [`
|
|
532
|
+
availableKeys$3.map((key) => [`storybook/${key}`, 'error'])
|
|
518
533
|
);
|
|
519
534
|
|
|
520
535
|
const overrideRules$3 = {};
|
|
521
536
|
|
|
522
537
|
const config$5 = Object.assign(baseRules$3, overrideRules$3);
|
|
523
538
|
|
|
524
|
-
const { rules: rules$2 } = plugin$
|
|
539
|
+
const { rules: rules$2 } = plugin$8;
|
|
525
540
|
|
|
526
541
|
const availableKeys$2 = Object.keys(rules$2).filter(
|
|
527
542
|
(key) => !rules$2[key].meta.deprecated
|
|
528
543
|
);
|
|
529
544
|
|
|
530
545
|
const baseRules$2 = Object.fromEntries(
|
|
531
|
-
availableKeys$2.map((key) => [`
|
|
546
|
+
availableKeys$2.map((key) => [`unused-imports/${key}`, 'error'])
|
|
532
547
|
);
|
|
533
548
|
|
|
534
549
|
const overrideRules$2 = {};
|
|
535
550
|
|
|
536
551
|
const config$4 = Object.assign(baseRules$2, overrideRules$2);
|
|
537
552
|
|
|
538
|
-
const { rules: rules$1 } = plugin$
|
|
553
|
+
const { rules: rules$1 } = plugin$9;
|
|
539
554
|
|
|
540
555
|
const availableKeys$1 = Object.keys(rules$1).filter(
|
|
541
556
|
(key) => !rules$1[key].meta.deprecated
|
|
542
557
|
);
|
|
543
558
|
|
|
544
559
|
const baseRules$1 = Object.fromEntries(
|
|
545
|
-
availableKeys$1.map((key) => [`
|
|
560
|
+
availableKeys$1.map((key) => [`sonarjs/${key}`, 'error'])
|
|
546
561
|
);
|
|
547
562
|
|
|
548
563
|
const overrideRules$1 = {};
|
|
549
564
|
|
|
550
565
|
const config$3 = Object.assign(baseRules$1, overrideRules$1);
|
|
551
566
|
|
|
552
|
-
const
|
|
567
|
+
const config$2 = {
|
|
568
|
+
'compat/compat': 'warn',
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
const { rules } = plugin$a;
|
|
553
572
|
|
|
554
573
|
const availableKeys = Object.keys(rules).filter(
|
|
555
574
|
(key) => !rules[key].meta.deprecated
|
|
556
575
|
);
|
|
557
576
|
|
|
558
577
|
const baseRules = Object.fromEntries(
|
|
559
|
-
availableKeys.map((key) => [`
|
|
578
|
+
availableKeys.map((key) => [`unicorn/${key}`, 'error'])
|
|
560
579
|
);
|
|
561
580
|
|
|
562
581
|
const overrideRules = {};
|
|
563
582
|
|
|
564
|
-
const config$
|
|
565
|
-
|
|
566
|
-
const config$1 = {
|
|
567
|
-
'compat/compat': 'warn',
|
|
568
|
-
};
|
|
583
|
+
const config$1 = Object.assign(baseRules, overrideRules);
|
|
569
584
|
|
|
570
585
|
/* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
|
|
571
586
|
|
|
@@ -610,20 +625,22 @@ const config = [
|
|
|
610
625
|
// tailwindcss,
|
|
611
626
|
sonarjs: plugin$9,
|
|
612
627
|
compat,
|
|
628
|
+
unicorn: plugin$a,
|
|
613
629
|
},
|
|
614
630
|
rules: {
|
|
631
|
+
...config$i,
|
|
615
632
|
...config$h,
|
|
616
633
|
...config$g,
|
|
617
|
-
...config$
|
|
634
|
+
...config$e,
|
|
618
635
|
...config$d,
|
|
619
|
-
...config$
|
|
636
|
+
...config$b,
|
|
620
637
|
...config$a,
|
|
621
638
|
...config$9,
|
|
622
639
|
...config$8,
|
|
623
|
-
...config$7,
|
|
624
640
|
...eslintPrettier.rules,
|
|
625
|
-
...config$
|
|
641
|
+
...config$4,
|
|
626
642
|
// ...tailwindcssRules,
|
|
643
|
+
...config$3,
|
|
627
644
|
...config$2,
|
|
628
645
|
...config$1,
|
|
629
646
|
},
|
|
@@ -656,8 +673,8 @@ const config = [
|
|
|
656
673
|
'import/typescript': importTypescriptResolver,
|
|
657
674
|
},
|
|
658
675
|
rules: {
|
|
659
|
-
...config$
|
|
660
|
-
...config$
|
|
676
|
+
...config$7,
|
|
677
|
+
...config$f,
|
|
661
678
|
},
|
|
662
679
|
},
|
|
663
680
|
{
|
|
@@ -671,7 +688,7 @@ const config = [
|
|
|
671
688
|
jest: plugin$2,
|
|
672
689
|
},
|
|
673
690
|
rules: {
|
|
674
|
-
...config$
|
|
691
|
+
...config$c,
|
|
675
692
|
},
|
|
676
693
|
},
|
|
677
694
|
{
|
|
@@ -685,7 +702,7 @@ const config = [
|
|
|
685
702
|
cypress: plugin$6,
|
|
686
703
|
},
|
|
687
704
|
rules: {
|
|
688
|
-
...config$
|
|
705
|
+
...config$6,
|
|
689
706
|
},
|
|
690
707
|
},
|
|
691
708
|
{
|
|
@@ -699,7 +716,7 @@ const config = [
|
|
|
699
716
|
storybook: plugin$7,
|
|
700
717
|
},
|
|
701
718
|
rules: {
|
|
702
|
-
...config$
|
|
719
|
+
...config$5,
|
|
703
720
|
},
|
|
704
721
|
},
|
|
705
722
|
{
|
package/dist/eslint.config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Jr from"eslint-plugin-react";import Mr from"eslint-plugin-react-hooks";import Nr from"@typescript-eslint/eslint-plugin";import Ur from"eslint-plugin-jsx-a11y";import*as o from"eslint-plugin-import";import Wr from"eslint-plugin-jest";import Xr from"eslint-plugin-promise";import Yr from"eslint-plugin-n";import Zr from"@next/eslint-plugin-next";import e from"globals";import re from"eslint-plugin-prettier";import ee from"eslint-plugin-cypress";import oe from"eslint-plugin-storybook";import te from"eslint-plugin-unused-imports";import*as se from"eslint-import-resolver-typescript";import ne from"eslint-plugin-html";import ie from"eslint-plugin-compat";import ae from"eslint-config-prettier";import*as ce from"@typescript-eslint/parser";import pe from"eslint-plugin-sonarjs";var z={"array-callback-return":"error","constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-fallthrough":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-misleading-character-class":"error","no-new-symbol":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-self-assign":"error","no-self-compare":"error","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-undef":"error","no-unmodified-loop-condition":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-private-class-members":"off","no-useless-backreference":"error","require-atomic-updates":"error","use-isnan":"error","valid-typeof":"error","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"error","consistent-this":"error",curly:"error","default-case":"error","default-case-last":"error",eqeqeq:"error","func-name-matching":"error","func-names":"error","func-style":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":["error",{exceptions:["x","y","z"]}],"id-match":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"error","max-params":"off","max-statements":"off","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-console":"error","no-continue":"error","no-delete-var":"error","no-div-regex":"error","no-else-return":"error","no-empty":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-inline-comments":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-object":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-proto":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-ternary":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"error","no-unneeded-ternary":"error","no-unused-labels":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":["error",{array:!1,object:!0}],"prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"off","sort-keys":"off","sort-vars":"off","spaced-comment":"error",strict:"error","symbol-description":"error","vars-on-top":"error",yoda:"error","line-comment-position":"error"},t=z;import A from"eslint-plugin-react";var{rules:s}=A,H=Object.keys(s).filter(r=>!s[r].meta.deprecated),I=Object.fromEntries(H.map(r=>[`react/${r}`,"error"])),F={"react/forbid-component-props":"off","react/function-component-definition":["error",{namedComponents:"arrow-function"}],"react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"off","react/no-invalid-html-attribute":"off","react/no-multi-comp":"off","react/no-unused-class-component-methods":"off","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/jsx-filename-extension":["error",{extensions:[".tsx"]}],"react/jsx-max-depth":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-no-bind":"off","react/jsx-no-literals":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-spreading":"off","react/jsx-sort-props":"off"},L=Object.assign(I,F),n=L;import{rules as i}from"eslint-plugin-react-hooks";var S=Object.keys(i).filter(r=>!i[r].meta.deprecated),Q=Object.fromEntries(S.map(r=>[`react-hooks/${r}`,"error"])),V={"react-hooks/exhaustive-deps":["error",{additionalHooks:"(useAsync)"}]},_=Object.assign(Q,V),a=_;import B from"@typescript-eslint/eslint-plugin";var{rules:c}=B,D=Object.keys(c).filter(r=>!c[r].meta.deprecated),G=Object.fromEntries(D.map(r=>[`@typescript-eslint/${r}`,"error"])),J={"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/naming-convention":["error",{selector:"default",format:["camelCase","PascalCase","snake_case"]},{selector:"objectLiteralProperty",format:null,modifiers:["requiresQuotes"]}],"@typescript-eslint/no-confusing-void-expression":"off","@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-type-alias":"off","@typescript-eslint/prefer-readonly":"off","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/sort-type-union-intersection-members":"off","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/no-magic-numbers":"off","@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":"off","@typescript-eslint/lines-between-class-members":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/padding-line-between-statements":"off","@typescript-eslint/quotes":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"},M=Object.assign(G,J),p=M;import N from"eslint-plugin-jsx-a11y";var{rules:f}=N,U=Object.keys(f).filter(r=>!f[r].meta.deprecated),W=Object.fromEntries(U.map(r=>[`jsx-a11y/${r}`,"error"])),X={"jsx-a11y/no-autofocus":"off","jsx-a11y/label-has-associated-control":["error",{labelComponents:["Label"],controlComponents:["Input","Select","Textarea","Checkbox","Radio"],depth:3}]},Y=Object.assign(W,X),l=Y;import{rules as m}from"eslint-plugin-import";var Z=Object.keys(m).filter(r=>!m[r].meta.deprecated),rr=Object.fromEntries(Z.map(r=>[`import/${r}`,"error"])),er={"import/no-unresolved":"off","import/no-internal-modules":"off","import/no-relative-parent-imports":"off","import/no-named-as-default":"off","import/exports-last":"off","import/no-namespace":"off","import/extensions":"off","import/order":["error",{groups:["builtin","external","internal","parent","sibling","index","object","type"]}],"import/prefer-default-export":"off","import/max-dependencies":"off","import/no-unassigned-import":"off","import/no-default-export":"off","import/no-named-export":"off","import/group-exports":"off"},or=Object.assign(rr,er),u=or;import tr from"eslint-plugin-jest";var{rules:d}=tr,sr=Object.keys(d).filter(r=>!d[r].meta.deprecated),nr=Object.fromEntries(sr.map(r=>[`jest/${r}`,"error"])),ir={},ar=Object.assign(nr,ir),y=ar;import cr from"eslint-plugin-promise";var{rules:b}=cr,pr=Object.keys(b).filter(r=>!b[r].meta.deprecated),fr=Object.fromEntries(pr.map(r=>[`promise/${r}`,"error"])),lr={"promise/catch-or-return":["error",{allowFinally:!0}],"promise/no-native":"off"},mr=Object.assign(fr,lr),g=mr;import ur from"eslint-plugin-n";var{rules:x}=ur,dr=Object.keys(x).filter(r=>!x[r].meta.deprecated),yr=Object.fromEntries(dr.map(r=>[`n/${r}`,"error"])),br={"n/no-missing-import":"off","n/no-unsupported-features/es-builtins":"off","n/no-unsupported-features/es-syntax":"off","n/no-unsupported-features/node-builtins":"off","n/file-extension-in-import":"off","n/no-process-env":"off"},gr=Object.assign(yr,br),j=gr;import xr from"@next/eslint-plugin-next";var{rules:v}=xr,jr=Object.keys(v).filter(r=>!v[r].meta.deprecated),vr=Object.fromEntries(jr.map(r=>[`@next/next/${r}`,"error"])),Or={},Rr=Object.assign(vr,Or),O=Rr;var hr={"prettier/prettier":"error"},R=hr;var kr={"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","default-param-last":"off","dot-notation":"off","func-call-spacing":"off",indent:"off","init-declarations":"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off","no-dupe-class-members":"off","no-duplicate-imports":"off","no-empty-function":"off","no-extra-parens":"off","no-extra-semi":"off","no-implied-eval":"off","no-invalid-this":"off","no-loop-func":"off","no-loss-of-precision":"off","no-magic-numbers":"off","no-redeclare":"off","no-restricted-imports":"off","no-shadow":"off","no-throw-literal":"off","no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-constructor":"off","object-curly-spacing":"off","padding-line-between-statements":"off",quotes:"off","require-await":"off","no-return-await":"off",semi:"off","space-before-function-paren":"off","space-infix-ops":"off"},h=kr;import wr from"eslint-plugin-cypress";var{rules:k}=wr,qr=Object.keys(k).filter(r=>!k[r].meta.deprecated),Er=Object.fromEntries(qr.map(r=>[`cypress/${r}`,"error"])),Kr={},$r=Object.assign(Er,Kr),w=$r;import Cr from"eslint-plugin-storybook";var{rules:q}=Cr,Pr=Object.keys(q).filter(r=>!q[r].meta.deprecated),Tr=Object.fromEntries(Pr.map(r=>[`storybook/${r}`,"error"])),zr={},Ar=Object.assign(Tr,zr),E=Ar;import Hr from"eslint-plugin-unused-imports";var{rules:K}=Hr,Ir=Object.keys(K).filter(r=>!K[r].meta.deprecated),Fr=Object.fromEntries(Ir.map(r=>[`unused-imports/${r}`,"error"])),Lr={},Sr=Object.assign(Fr,Lr),$=Sr;import Qr from"eslint-plugin-sonarjs";var{rules:C}=Qr,Vr=Object.keys(C).filter(r=>!C[r].meta.deprecated),_r=Object.fromEntries(Vr.map(r=>[`sonarjs/${r}`,"error"])),Br={},Dr=Object.assign(_r,Br),P=Dr;var Gr={"compat/compat":"warn"},T=Gr;var fe=[o.configs.typescript,{languageOptions:{sourceType:"module",globals:{...e.browser,...e.node},parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}}},files:["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.json","**/*.mjs","**/*.cjs","**/*.html"],plugins:{prettier:re,react:Jr,"react-hooks":Mr,"jsx-a11y":Ur,import:o,promise:Xr,n:Yr,"@next/next":Zr,"unused-imports":te,sonarjs:pe,compat:ie},rules:{...t,...n,...a,...l,...u,...g,...j,...O,...R,...ae.rules,...$,...P,...T},settings:{react:{version:"detect"},"import/parsers":{espree:[".js",".cjs",".mjs",".jsx",".ts",".tsx"]},"import/resolver":{typescript:!0,node:!0}}},{files:["**/*.ts","**/*.tsx"],languageOptions:{parser:ce,parserOptions:{project:"./tsconfig.json"}},plugins:{"@typescript-eslint":Nr,"import/typescript":se},rules:{...h,...p}},{files:["**/*.test.js","**/*.test.jsx","tests/**/*.js","tests/**/*.jsx"],languageOptions:{globals:{...e.jest}},plugins:{jest:Wr},rules:{...y}},{files:["**/*.cy.js","**/*.cy.jsx"],languageOptions:{globals:{...e.cypress}},plugins:{cypress:ee},rules:{...w}},{files:["**/*.stories.js","**/*.stories.jsx","**/*.stories.ts","**/*.stories.tsx"],plugins:{storybook:oe},rules:{...E}},{files:["**/*.html"],plugins:{html:ne},settings:{"html/javascript-tag-names":["script","Script"]}}],Ro=fe;export{Ro as default};
|
|
1
|
+
import Zr from"eslint-plugin-react";import re from"eslint-plugin-react-hooks";import ee from"@typescript-eslint/eslint-plugin";import oe from"eslint-plugin-jsx-a11y";import*as o from"eslint-plugin-import";import te from"eslint-plugin-jest";import se from"eslint-plugin-promise";import ne from"eslint-plugin-n";import ie from"@next/eslint-plugin-next";import e from"globals";import ae from"eslint-plugin-prettier";import ce from"eslint-plugin-cypress";import pe from"eslint-plugin-storybook";import fe from"eslint-plugin-unused-imports";import*as le from"eslint-import-resolver-typescript";import me from"eslint-plugin-html";import ue from"eslint-plugin-compat";import de from"eslint-config-prettier";import*as ye from"@typescript-eslint/parser";import be from"eslint-plugin-sonarjs";import ge from"eslint-plugin-unicorn";var H={"array-callback-return":"error","constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-fallthrough":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-misleading-character-class":"error","no-new-symbol":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-self-assign":"error","no-self-compare":"error","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-undef":"error","no-unmodified-loop-condition":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-private-class-members":"off","no-useless-backreference":"error","require-atomic-updates":"error","use-isnan":"error","valid-typeof":"error","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"error","consistent-this":"error",curly:"error","default-case":"error","default-case-last":"error",eqeqeq:"error","func-name-matching":"error","func-names":"error","func-style":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":["error",{exceptions:["x","y","z"]}],"id-match":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"error","max-params":"off","max-statements":"off","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-console":"error","no-continue":"error","no-delete-var":"error","no-div-regex":"error","no-else-return":"error","no-empty":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-inline-comments":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-object":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-proto":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-ternary":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"error","no-unneeded-ternary":"error","no-unused-labels":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":["error",{array:!1,object:!0}],"prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"off","sort-keys":"off","sort-vars":"off","spaced-comment":"error",strict:"error","symbol-description":"error","vars-on-top":"error",yoda:"error","line-comment-position":"error"},t=H;import I from"eslint-plugin-react";var{rules:s}=I,F=Object.keys(s).filter(r=>!s[r].meta.deprecated),L=Object.fromEntries(F.map(r=>[`react/${r}`,"error"])),S={"react/forbid-component-props":"off","react/function-component-definition":["error",{namedComponents:"arrow-function"}],"react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"off","react/no-invalid-html-attribute":"off","react/no-multi-comp":"off","react/no-unused-class-component-methods":"off","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/jsx-filename-extension":["error",{extensions:[".tsx"]}],"react/jsx-max-depth":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-no-bind":"off","react/jsx-no-literals":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-spreading":"off","react/jsx-sort-props":"off"},Q=Object.assign(L,S),n=Q;import{rules as i}from"eslint-plugin-react-hooks";var V=Object.keys(i).filter(r=>!i[r].meta.deprecated),_=Object.fromEntries(V.map(r=>[`react-hooks/${r}`,"error"])),B={"react-hooks/exhaustive-deps":["error",{additionalHooks:"(useAsync)"}]},D=Object.assign(_,B),a=D;import G from"@typescript-eslint/eslint-plugin";var{rules:c}=G,J=Object.keys(c).filter(r=>!c[r].meta.deprecated),M=Object.fromEntries(J.map(r=>[`@typescript-eslint/${r}`,"error"])),N={"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/naming-convention":["error",{selector:"default",format:["camelCase","PascalCase","snake_case"]},{selector:"objectLiteralProperty",format:null,modifiers:["requiresQuotes"]}],"@typescript-eslint/no-confusing-void-expression":"off","@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-type-alias":"off","@typescript-eslint/prefer-readonly":"off","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/sort-type-union-intersection-members":"off","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/no-magic-numbers":"off","@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":"off","@typescript-eslint/lines-between-class-members":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/padding-line-between-statements":"off","@typescript-eslint/quotes":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"},U=Object.assign(M,N),p=U;import W from"eslint-plugin-jsx-a11y";var{rules:f}=W,X=Object.keys(f).filter(r=>!f[r].meta.deprecated),Y=Object.fromEntries(X.map(r=>[`jsx-a11y/${r}`,"error"])),Z={"jsx-a11y/no-autofocus":"off","jsx-a11y/label-has-associated-control":["error",{labelComponents:["Label"],controlComponents:["Input","Select","Textarea","Checkbox","Radio"],depth:3}]},rr=Object.assign(Y,Z),l=rr;import{rules as m}from"eslint-plugin-import";var er=Object.keys(m).filter(r=>!m[r].meta.deprecated),or=Object.fromEntries(er.map(r=>[`import/${r}`,"error"])),tr={"import/no-unresolved":"off","import/no-internal-modules":"off","import/no-relative-parent-imports":"off","import/no-named-as-default":"off","import/exports-last":"off","import/no-namespace":"off","import/extensions":"off","import/order":["error",{groups:["builtin","external","internal","parent","sibling","index","object","type"]}],"import/prefer-default-export":"off","import/max-dependencies":"off","import/no-unassigned-import":"off","import/no-default-export":"off","import/no-named-export":"off","import/group-exports":"off"},sr=Object.assign(or,tr),u=sr;import nr from"eslint-plugin-jest";var{rules:d}=nr,ir=Object.keys(d).filter(r=>!d[r].meta.deprecated),ar=Object.fromEntries(ir.map(r=>[`jest/${r}`,"error"])),cr={},pr=Object.assign(ar,cr),y=pr;import fr from"eslint-plugin-promise";var{rules:b}=fr,lr=Object.keys(b).filter(r=>!b[r].meta.deprecated),mr=Object.fromEntries(lr.map(r=>[`promise/${r}`,"error"])),ur={"promise/catch-or-return":["error",{allowFinally:!0}],"promise/no-native":"off"},dr=Object.assign(mr,ur),g=dr;import yr from"eslint-plugin-n";var{rules:x}=yr,br=Object.keys(x).filter(r=>!x[r].meta.deprecated),gr=Object.fromEntries(br.map(r=>[`n/${r}`,"error"])),xr={"n/no-missing-import":"off","n/no-unsupported-features/es-builtins":"off","n/no-unsupported-features/es-syntax":"off","n/no-unsupported-features/node-builtins":"off","n/file-extension-in-import":"off","n/no-process-env":"off"},jr=Object.assign(gr,xr),j=jr;import vr from"@next/eslint-plugin-next";var{rules:v}=vr,Or=Object.keys(v).filter(r=>!v[r].meta.deprecated),Rr=Object.fromEntries(Or.map(r=>[`@next/next/${r}`,"error"])),kr={},hr=Object.assign(Rr,kr),O=hr;var wr={"prettier/prettier":"error"},R=wr;var Er={"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","default-param-last":"off","dot-notation":"off","func-call-spacing":"off",indent:"off","init-declarations":"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off","no-dupe-class-members":"off","no-duplicate-imports":"off","no-empty-function":"off","no-extra-parens":"off","no-extra-semi":"off","no-implied-eval":"off","no-invalid-this":"off","no-loop-func":"off","no-loss-of-precision":"off","no-magic-numbers":"off","no-redeclare":"off","no-restricted-imports":"off","no-shadow":"off","no-throw-literal":"off","no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-constructor":"off","object-curly-spacing":"off","padding-line-between-statements":"off",quotes:"off","require-await":"off","no-return-await":"off",semi:"off","space-before-function-paren":"off","space-infix-ops":"off"},k=Er;import Kr from"eslint-plugin-cypress";var{rules:h}=Kr,$r=Object.keys(h).filter(r=>!h[r].meta.deprecated),qr=Object.fromEntries($r.map(r=>[`cypress/${r}`,"error"])),Cr={},Pr=Object.assign(qr,Cr),w=Pr;import Tr from"eslint-plugin-storybook";var{rules:E}=Tr,zr=Object.keys(E).filter(r=>!E[r].meta.deprecated),Ar=Object.fromEntries(zr.map(r=>[`storybook/${r}`,"error"])),Hr={},Ir=Object.assign(Ar,Hr),K=Ir;import Fr from"eslint-plugin-unused-imports";var{rules:$}=Fr,Lr=Object.keys($).filter(r=>!$[r].meta.deprecated),Sr=Object.fromEntries(Lr.map(r=>[`unused-imports/${r}`,"error"])),Qr={},Vr=Object.assign(Sr,Qr),q=Vr;import _r from"eslint-plugin-sonarjs";var{rules:C}=_r,Br=Object.keys(C).filter(r=>!C[r].meta.deprecated),Dr=Object.fromEntries(Br.map(r=>[`sonarjs/${r}`,"error"])),Gr={},Jr=Object.assign(Dr,Gr),P=Jr;var Mr={"compat/compat":"warn"},T=Mr;import Nr from"eslint-plugin-unicorn";var{rules:z}=Nr,Ur=Object.keys(z).filter(r=>!z[r].meta.deprecated),Wr=Object.fromEntries(Ur.map(r=>[`unicorn/${r}`,"error"])),Xr={},Yr=Object.assign(Wr,Xr),A=Yr;var xe=[o.configs.typescript,{languageOptions:{sourceType:"module",globals:{...e.browser,...e.node},parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}}},files:["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.json","**/*.mjs","**/*.cjs","**/*.html"],plugins:{prettier:ae,react:Zr,"react-hooks":re,"jsx-a11y":oe,import:o,promise:se,n:ne,"@next/next":ie,"unused-imports":fe,sonarjs:be,compat:ue,unicorn:ge},rules:{...t,...n,...a,...l,...u,...g,...j,...O,...R,...de.rules,...q,...P,...T,...A},settings:{react:{version:"detect"},"import/parsers":{espree:[".js",".cjs",".mjs",".jsx",".ts",".tsx"]},"import/resolver":{typescript:!0,node:!0}}},{files:["**/*.ts","**/*.tsx"],languageOptions:{parser:ye,parserOptions:{project:"./tsconfig.json"}},plugins:{"@typescript-eslint":ee,"import/typescript":le},rules:{...k,...p}},{files:["**/*.test.js","**/*.test.jsx","tests/**/*.js","tests/**/*.jsx"],languageOptions:{globals:{...e.jest}},plugins:{jest:te},rules:{...y}},{files:["**/*.cy.js","**/*.cy.jsx"],languageOptions:{globals:{...e.cypress}},plugins:{cypress:ce},rules:{...w}},{files:["**/*.stories.js","**/*.stories.jsx","**/*.stories.ts","**/*.stories.tsx"],plugins:{storybook:pe},rules:{...K}},{files:["**/*.html"],plugins:{html:me},settings:{"html/javascript-tag-names":["script","Script"]}}],Ao=xe;export{Ao as default};
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
23
23
|
"eslint-plugin-storybook": "^0.8.0",
|
|
24
24
|
"eslint-plugin-tailwindcss": "^3.17.0",
|
|
25
|
+
"eslint-plugin-unicorn": "^53.0.0",
|
|
25
26
|
"eslint-plugin-unused-imports": "^4.0.0",
|
|
26
27
|
"globals": "^15.3.0",
|
|
27
28
|
"prettier-plugin-tailwindcss": "^0.5.14",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
},
|
|
51
52
|
"name": "ultracite",
|
|
52
53
|
"description": "Strict, opinionated ESLint config for modern TypeScript apps.",
|
|
53
|
-
"version": "3.
|
|
54
|
+
"version": "3.7.1",
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public",
|
|
56
57
|
"registry": "https://registry.npmjs.org/"
|