ultracite 3.5.2 → 3.6.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/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) and [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) and [Compat](https://www.npmjs.com/package/eslint-plugin-compat).
18
18
 
19
19
  ### Prettier
20
20
 
@@ -137,5 +137,4 @@ If you see any errors, it could be related to peer dependencies or changes in de
137
137
  - https://github.com/ota-meshi/eslint-plugin-yml
138
138
  - https://github.com/mdx-js/eslint-mdx/tree/master/packages/eslint-plugin-mdx
139
139
  - https://github.com/eslint/eslint-plugin-markdown
140
- - https://github.com/amilajack/eslint-plugin-compat
141
140
  - https://github.com/sindresorhus/eslint-plugin-unicorn
@@ -15,11 +15,12 @@ import plugin$7 from 'eslint-plugin-storybook';
15
15
  import plugin$8 from 'eslint-plugin-unused-imports';
16
16
  import * as importTypescriptResolver from 'eslint-import-resolver-typescript';
17
17
  import html from 'eslint-plugin-html';
18
+ import compat from 'eslint-plugin-compat';
18
19
  import eslintPrettier from 'eslint-config-prettier';
19
20
  import * as typescriptParser from '@typescript-eslint/parser';
20
21
  import plugin$9 from 'eslint-plugin-sonarjs';
21
22
 
22
- const config$g = {
23
+ const config$h = {
23
24
  // ESLint Possible Problems: These rules relate to possible logic errors in code
24
25
  'array-callback-return': 'error',
25
26
  'constructor-super': 'error',
@@ -248,7 +249,7 @@ const overrideRules$c = {
248
249
  'react/jsx-sort-props': 'off',
249
250
  };
250
251
 
251
- const config$f = Object.assign(baseRules$c, overrideRules$c);
252
+ const config$g = Object.assign(baseRules$c, overrideRules$c);
252
253
 
253
254
  const availableKeys$b = Object.keys(rules$b).filter(
254
255
  (key) => !rules$b[key].meta.deprecated
@@ -268,7 +269,7 @@ const overrideRules$b = {
268
269
  ],
269
270
  };
270
271
 
271
- const config$e = Object.assign(baseRules$b, overrideRules$b);
272
+ const config$f = Object.assign(baseRules$b, overrideRules$b);
272
273
 
273
274
  const { rules: rules$9 } = typescript;
274
275
 
@@ -327,7 +328,7 @@ const overrideRules$a = {
327
328
  '@typescript-eslint/type-annotation-spacing': 'off',
328
329
  };
329
330
 
330
- const config$d = Object.assign(baseRules$a, overrideRules$a);
331
+ const config$e = Object.assign(baseRules$a, overrideRules$a);
331
332
 
332
333
  const { rules: rules$8 } = plugin$1;
333
334
 
@@ -351,7 +352,7 @@ const overrideRules$9 = {
351
352
  ],
352
353
  };
353
354
 
354
- const config$c = Object.assign(baseRules$9, overrideRules$9);
355
+ const config$d = Object.assign(baseRules$9, overrideRules$9);
355
356
 
356
357
  const availableKeys$8 = Object.keys(rules$c).filter(
357
358
  (key) => !rules$c[key].meta.deprecated
@@ -392,7 +393,7 @@ const overrideRules$8 = {
392
393
  'import/group-exports': 'off',
393
394
  };
394
395
 
395
- const config$b = Object.assign(baseRules$8, overrideRules$8);
396
+ const config$c = Object.assign(baseRules$8, overrideRules$8);
396
397
 
397
398
  const { rules: rules$7 } = plugin$2;
398
399
 
@@ -406,7 +407,7 @@ const baseRules$7 = Object.fromEntries(
406
407
 
407
408
  const overrideRules$7 = {};
408
409
 
409
- const config$a = Object.assign(baseRules$7, overrideRules$7);
410
+ const config$b = Object.assign(baseRules$7, overrideRules$7);
410
411
 
411
412
  const { rules: rules$6 } = plugin$3;
412
413
 
@@ -423,7 +424,7 @@ const overrideRules$6 = {
423
424
  'promise/no-native': 'off',
424
425
  };
425
426
 
426
- const config$9 = Object.assign(baseRules$6, overrideRules$6);
427
+ const config$a = Object.assign(baseRules$6, overrideRules$6);
427
428
 
428
429
  const { rules: rules$5 } = plugin$4;
429
430
 
@@ -444,7 +445,7 @@ const overrideRules$5 = {
444
445
  'n/no-process-env': 'off',
445
446
  };
446
447
 
447
- const config$8 = Object.assign(baseRules$5, overrideRules$5);
448
+ const config$9 = Object.assign(baseRules$5, overrideRules$5);
448
449
 
449
450
  const { rules: rules$4 } = plugin$5;
450
451
 
@@ -458,13 +459,13 @@ const baseRules$4 = Object.fromEntries(
458
459
 
459
460
  const overrideRules$4 = {};
460
461
 
461
- const config$7 = Object.assign(baseRules$4, overrideRules$4);
462
+ const config$8 = Object.assign(baseRules$4, overrideRules$4);
462
463
 
463
- const config$6 = {
464
+ const config$7 = {
464
465
  'prettier/prettier': 'error',
465
466
  };
466
467
 
467
- const config$5 = {
468
+ const config$6 = {
468
469
  // ESLint Disabled for Typescript-ESLint
469
470
  'brace-style': 'off',
470
471
  camelcase: 'off',
@@ -518,7 +519,7 @@ const baseRules$3 = Object.fromEntries(
518
519
 
519
520
  const overrideRules$3 = {};
520
521
 
521
- const config$4 = Object.assign(baseRules$3, overrideRules$3);
522
+ const config$5 = Object.assign(baseRules$3, overrideRules$3);
522
523
 
523
524
  const { rules: rules$2 } = plugin$7;
524
525
 
@@ -532,7 +533,7 @@ const baseRules$2 = Object.fromEntries(
532
533
 
533
534
  const overrideRules$2 = {};
534
535
 
535
- const config$3 = Object.assign(baseRules$2, overrideRules$2);
536
+ const config$4 = Object.assign(baseRules$2, overrideRules$2);
536
537
 
537
538
  const { rules: rules$1 } = plugin$8;
538
539
 
@@ -546,7 +547,7 @@ const baseRules$1 = Object.fromEntries(
546
547
 
547
548
  const overrideRules$1 = {};
548
549
 
549
- const config$2 = Object.assign(baseRules$1, overrideRules$1);
550
+ const config$3 = Object.assign(baseRules$1, overrideRules$1);
550
551
 
551
552
  const { rules } = plugin$9;
552
553
 
@@ -560,14 +561,14 @@ const baseRules = Object.fromEntries(
560
561
 
561
562
  const overrideRules = {};
562
563
 
563
- const config$1 = Object.assign(baseRules, overrideRules);
564
+ const config$2 = Object.assign(baseRules, overrideRules);
564
565
 
565
- /* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
566
+ const config$1 = {
567
+ 'compat/compat': 'warn',
568
+ };
566
569
 
570
+ /* eslint-disable n/no-unpublished-import, n/no-extraneous-import, import/no-extraneous-dependencies, id-length */
567
571
 
568
- // Patch AudioWorkletGlobalScope
569
- const browserGlobals = { ...globals.browser };
570
- delete browserGlobals['AudioWorkletGlobalScope '];
571
572
 
572
573
  const config = [
573
574
  importPlugin.configs.typescript,
@@ -575,7 +576,7 @@ const config = [
575
576
  languageOptions: {
576
577
  sourceType: 'module',
577
578
  globals: {
578
- ...browserGlobals,
579
+ ...globals.browser,
579
580
  ...globals.node,
580
581
  },
581
582
  parserOptions: {
@@ -608,20 +609,22 @@ const config = [
608
609
  'unused-imports': plugin$8,
609
610
  // tailwindcss,
610
611
  sonarjs: plugin$9,
612
+ compat,
611
613
  },
612
614
  rules: {
615
+ ...config$h,
613
616
  ...config$g,
614
617
  ...config$f,
615
- ...config$e,
618
+ ...config$d,
616
619
  ...config$c,
617
- ...config$b,
620
+ ...config$a,
618
621
  ...config$9,
619
622
  ...config$8,
620
623
  ...config$7,
621
- ...config$6,
622
624
  ...eslintPrettier.rules,
623
- ...config$2,
625
+ ...config$3,
624
626
  // ...tailwindcssRules,
627
+ ...config$2,
625
628
  ...config$1,
626
629
  },
627
630
 
@@ -653,8 +656,8 @@ const config = [
653
656
  'import/typescript': importTypescriptResolver,
654
657
  },
655
658
  rules: {
656
- ...config$5,
657
- ...config$d,
659
+ ...config$6,
660
+ ...config$e,
658
661
  },
659
662
  },
660
663
  {
@@ -668,7 +671,7 @@ const config = [
668
671
  jest: plugin$2,
669
672
  },
670
673
  rules: {
671
- ...config$a,
674
+ ...config$b,
672
675
  },
673
676
  },
674
677
  {
@@ -682,7 +685,7 @@ const config = [
682
685
  cypress: plugin$6,
683
686
  },
684
687
  rules: {
685
- ...config$4,
688
+ ...config$5,
686
689
  },
687
690
  },
688
691
  {
@@ -696,7 +699,7 @@ const config = [
696
699
  storybook: plugin$7,
697
700
  },
698
701
  rules: {
699
- ...config$3,
702
+ ...config$4,
700
703
  },
701
704
  },
702
705
  {
@@ -1 +1 @@
1
- import Br from"eslint-plugin-react";import Dr from"eslint-plugin-react-hooks";import Jr from"@typescript-eslint/eslint-plugin";import Mr from"eslint-plugin-jsx-a11y";import*as o from"eslint-plugin-import";import Nr from"eslint-plugin-jest";import Ur from"eslint-plugin-promise";import Xr from"eslint-plugin-n";import Yr from"@next/eslint-plugin-next";import e from"globals";import Zr from"eslint-plugin-prettier";import re from"eslint-plugin-cypress";import ee from"eslint-plugin-storybook";import oe from"eslint-plugin-unused-imports";import*as te from"eslint-import-resolver-typescript";import se from"eslint-plugin-html";import ne from"eslint-config-prettier";import*as ie from"@typescript-eslint/parser";import ae from"eslint-plugin-sonarjs";var A={"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=A;import z from"eslint-plugin-react";var{rules:s}=z,H=Object.keys(s).filter(r=>!s[r].meta.deprecated),I=Object.fromEntries(H.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"},F=Object.assign(I,S),n=F;import{rules as i}from"eslint-plugin-react-hooks";var G=Object.keys(i).filter(r=>!i[r].meta.deprecated),L=Object.fromEntries(G.map(r=>[`react-hooks/${r}`,"error"])),Q={"react-hooks/exhaustive-deps":["error",{additionalHooks:"(useAsync)"}]},V=Object.assign(L,Q),a=V;import W from"@typescript-eslint/eslint-plugin";var{rules:c}=W,_=Object.keys(c).filter(r=>!c[r].meta.deprecated),B=Object.fromEntries(_.map(r=>[`@typescript-eslint/${r}`,"error"])),D={"@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"},J=Object.assign(B,D),p=J;import M from"eslint-plugin-jsx-a11y";var{rules:f}=M,N=Object.keys(f).filter(r=>!f[r].meta.deprecated),U=Object.fromEntries(N.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(U,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 kr={"prettier/prettier":"error"},R=kr;var hr={"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=hr;import wr from"eslint-plugin-cypress";var{rules:h}=wr,qr=Object.keys(h).filter(r=>!h[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"])),Ar={},zr=Object.assign(Tr,Ar),E=zr;import Hr from"eslint-plugin-unused-imports";var{rules:K}=Hr,Ir=Object.keys(K).filter(r=>!K[r].meta.deprecated),Sr=Object.fromEntries(Ir.map(r=>[`unused-imports/${r}`,"error"])),Fr={},Gr=Object.assign(Sr,Fr),$=Gr;import Lr from"eslint-plugin-sonarjs";var{rules:C}=Lr,Qr=Object.keys(C).filter(r=>!C[r].meta.deprecated),Vr=Object.fromEntries(Qr.map(r=>[`sonarjs/${r}`,"error"])),Wr={},_r=Object.assign(Vr,Wr),P=_r;var T={...e.browser};delete T["AudioWorkletGlobalScope "];var ce=[o.configs.typescript,{languageOptions:{sourceType:"module",globals:{...T,...e.node},parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}}},files:["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.json","**/*.mjs","**/*.cjs","**/*.html"],plugins:{prettier:Zr,react:Br,"react-hooks":Dr,"jsx-a11y":Mr,import:o,promise:Ur,n:Xr,"@next/next":Yr,"unused-imports":oe,sonarjs:ae},rules:{...t,...n,...a,...l,...u,...g,...j,...O,...R,...ne.rules,...$,...P},settings:{react:{version:"detect"},"import/parsers":{espree:[".js",".cjs",".mjs",".jsx",".ts",".tsx"]},"import/resolver":{typescript:!0,node:!0}}},{files:["**/*.ts","**/*.tsx"],languageOptions:{parser:ie,parserOptions:{project:"./tsconfig.json"}},plugins:{"@typescript-eslint":Jr,"import/typescript":te},rules:{...k,...p}},{files:["**/*.test.js","**/*.test.jsx","tests/**/*.js","tests/**/*.jsx"],languageOptions:{globals:{...e.jest}},plugins:{jest:Nr},rules:{...y}},{files:["**/*.cy.js","**/*.cy.jsx"],languageOptions:{globals:{...e.cypress}},plugins:{cypress:re},rules:{...w}},{files:["**/*.stories.js","**/*.stories.jsx","**/*.stories.ts","**/*.stories.tsx"],plugins:{storybook:ee},rules:{...E}},{files:["**/*.html"],plugins:{html:se},settings:{"html/javascript-tag-names":["script","Script"]}}],go=ce;export{go as default};
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};
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
+ "browserslist": [
3
+ "defaults"
4
+ ],
2
5
  "dependencies": {
3
6
  "@next/eslint-plugin-next": "^14.2.3",
4
7
  "@typescript-eslint/eslint-plugin": "^7.11.0",
5
8
  "@typescript-eslint/parser": "^7.11.0",
6
9
  "eslint-config-prettier": "^9.1.0",
7
10
  "eslint-import-resolver-typescript": "^3.6.1",
11
+ "eslint-plugin-compat": "^4.2.0",
8
12
  "eslint-plugin-cypress": "^3.2.0",
9
13
  "eslint-plugin-html": "^8.1.1",
10
14
  "eslint-plugin-import": "^2.29.1",
@@ -46,7 +50,7 @@
46
50
  },
47
51
  "name": "ultracite",
48
52
  "description": "Strict, opinionated ESLint config for modern TypeScript apps.",
49
- "version": "3.5.2",
53
+ "version": "3.6.0",
50
54
  "publishConfig": {
51
55
  "access": "public",
52
56
  "registry": "https://registry.npmjs.org/"