eslint-config-un 1.0.0-alpha.10 → 1.0.0-alpha.12

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.
Files changed (78) hide show
  1. package/README.md +76 -29
  2. package/dist/{angular-UZ2RIT64.js → angular-XI2MI3K5.js} +5 -5
  3. package/dist/{astro-DD7JPZB5.js → astro-4DJYZ5SG.js} +17 -14
  4. package/dist/{ava-MPRDWOOO.js → ava-LYLDX23A.js} +18 -6
  5. package/dist/{better-tailwind-MJBHTVZ2.js → better-tailwind-WUJ46FSH.js} +3 -3
  6. package/dist/{case-police-HAAQ5OD2.js → case-police-2G5M467O.js} +1 -1
  7. package/dist/{chunk-RV7CNPXM.js → chunk-7IQYQ5KM.js} +1 -1
  8. package/dist/{chunk-KEKX3JX7.js → chunk-P5U53E6S.js} +27 -3
  9. package/dist/{chunk-44SKJYI3.js → chunk-T6VV7MSS.js} +473 -176
  10. package/dist/{chunk-R2JUYKZ5.js → chunk-X4NBNG32.js} +2 -2
  11. package/dist/{cli-XUPFKP6H.js → cli-ZHQZMKTG.js} +1 -1
  12. package/dist/{cloudfront-functions-2FW2QYXU.js → cloudfront-functions-PWBWKYGS.js} +2 -2
  13. package/dist/compat-576LXOE5.js +25 -0
  14. package/dist/{cspell-7EYXMN7F.js → cspell-5C2GLYVK.js} +1 -1
  15. package/dist/{css-H4AD73OS.js → css-6KBCDONZ.js} +1 -1
  16. package/dist/{css-in-js-RITOYOGM.js → css-in-js-UQM27UJJ.js} +1 -1
  17. package/dist/{cypress-EPYIMG3H.js → cypress-IPWBSGU7.js} +19 -7
  18. package/dist/{de-morgan-OG4TXXNS.js → de-morgan-XO5VE44N.js} +1 -1
  19. package/dist/{depend-SUYP4MQW.js → depend-PKDGMMUG.js} +2 -2
  20. package/dist/{ember-AW7CQJQF.js → ember-4C3RO2SE.js} +13 -4
  21. package/dist/{erasable-syntax-only-N6JHE7EK.js → erasable-syntax-only-WSFG4SIR.js} +1 -1
  22. package/dist/es-EBOG23MQ.js +7 -0
  23. package/dist/{eslint-comments-YUE4O6BM.js → eslint-comments-P73CTRCL.js} +1 -1
  24. package/dist/{eslint-plugin-NIXU5PFI.js → eslint-plugin-D6HTOH3A.js} +2 -2
  25. package/dist/{file-progress-F3NYA7BG.js → file-progress-7BZJBF65.js} +1 -1
  26. package/dist/{graphql-H5VCVEVJ.js → graphql-AA47YBWW.js} +5 -2
  27. package/dist/html-KHPRNGDF.js +45 -0
  28. package/dist/{import-E4SRATMT.js → import-DL5R22Z4.js} +2 -2
  29. package/dist/index.d.ts +7553 -5941
  30. package/dist/index.js +123 -77
  31. package/dist/{jest-FX6LZ7A3.js → jest-26GMNXUV.js} +27 -9
  32. package/dist/{js-ORWEDGCM.js → js-WDPLPUR2.js} +1 -1
  33. package/dist/{js-inline-KXDUL4NT.js → js-inline-RQAPWNV7.js} +2 -2
  34. package/dist/{jsdoc-YKMO4V4H.js → jsdoc-OW6YBAZ7.js} +1 -1
  35. package/dist/{json-schema-validator-XXIOOG7B.js → json-schema-validator-FPJQLCEX.js} +2 -2
  36. package/dist/{jsonc-EC3YFLQV.js → jsonc-LXGQJNEA.js} +2 -2
  37. package/dist/{chunk-I7H4HIC3.js → jsx-a11y-J3V72ZWA.js} +20 -17
  38. package/dist/lit-ZEBL3QEF.js +50 -0
  39. package/dist/{markdown-DSYXUNOC.js → markdown-KQMEKWD3.js} +3 -3
  40. package/dist/{math-HKL3YT6G.js → math-TQ3JAE5E.js} +1 -1
  41. package/dist/{mdx-2SJBC3XD.js → mdx-WOGC72GD.js} +3 -3
  42. package/dist/mocha-LFHKV2ES.js +69 -0
  43. package/dist/{nextjs-NKCIHC3D.js → nextjs-7AA7VH77.js} +1 -1
  44. package/dist/no-only-tests-3UHK5YXG.js +30 -0
  45. package/dist/{no-stylistic-rules-5DSH6Y67.js → no-stylistic-rules-IAGZ5LEW.js} +433 -23
  46. package/dist/{no-unsanitized-5D7JUYC6.js → no-unsanitized-WJOWSP2Z.js} +1 -1
  47. package/dist/{node-NTKCZRBQ.js → node-4ZM6SI3Z.js} +1 -1
  48. package/dist/{node-dependencies-547BN73H.js → node-dependencies-UKZKNVLP.js} +2 -2
  49. package/dist/{package-json-UUZAA33P.js → package-json-4NOOWLWU.js} +2 -2
  50. package/dist/{perfectionist-NBC6YLPV.js → perfectionist-VV52KH64.js} +1 -1
  51. package/dist/playwright-X2HAGPCF.js +67 -0
  52. package/dist/{pnpm-OCNPEX36.js → pnpm-JUBZ3QHS.js} +1 -1
  53. package/dist/{prefer-arrow-functions-KGSOVLGO.js → prefer-arrow-functions-BGJHQHVQ.js} +1 -1
  54. package/dist/{promise-3MQJ2DKS.js → promise-VOXHPR42.js} +1 -1
  55. package/dist/{qwik-VSC2VR7H.js → qwik-F7FNWCPF.js} +1 -1
  56. package/dist/{react-JLQ53RKP.js → react-CWAVRAO3.js} +25 -8
  57. package/dist/{regexp-HJ6GDJGD.js → regexp-2KU7EK6D.js} +1 -1
  58. package/dist/{security-C4KA6TH5.js → security-FQMZHJUR.js} +1 -1
  59. package/dist/{solid-B24SR5BX.js → solid-KVLRVYIP.js} +1 -1
  60. package/dist/{sonar-DFCFDCPG.js → sonar-ALONXKPU.js} +1 -1
  61. package/dist/{storybook-7MPIDRDY.js → storybook-IYPHDH3R.js} +1 -1
  62. package/dist/{svelte-FBR5TGS4.js → svelte-MNVTGZSQ.js} +3 -3
  63. package/dist/{tailwind-27BJV75B.js → tailwind-UDEDVTHD.js} +1 -1
  64. package/dist/{tanstack-query-K235PI3Z.js → tanstack-query-4SOEPLVI.js} +1 -1
  65. package/dist/{testing-library-ZOEVCKLK.js → testing-library-PQ3MPTVA.js} +22 -11
  66. package/dist/{toml-QKWAVBR4.js → toml-DW546URM.js} +2 -2
  67. package/dist/{ts-RN4ZY4XY.js → ts-SWTKLVKH.js} +5 -4
  68. package/dist/{turbo-AJSILEYI.js → turbo-LH2IHVFI.js} +1 -1
  69. package/dist/{unicorn-AEBJMRMS.js → unicorn-LPEDLOPK.js} +1 -1
  70. package/dist/{unused-imports-LFU6VQ62.js → unused-imports-MZESLGI2.js} +1 -1
  71. package/dist/{vitest-2XUCD3WD.js → vitest-SXGJSYYS.js} +29 -8
  72. package/dist/{vue-ZP3GHHEA.js → vue-INAUPVPW.js} +6 -3
  73. package/dist/{yaml-DH2R23O6.js → yaml-EXZLKD4O.js} +2 -2
  74. package/dist/you-dont-need-lodash-underscore-YUUG6WN5.js +27 -0
  75. package/package.json +217 -65
  76. package/dist/es-7U44XN7Z.js +0 -7
  77. package/dist/html-COURC4I5.js +0 -45
  78. package/dist/jsx-a11y-IFMWMWN5.js +0 -7
package/README.md CHANGED
@@ -31,7 +31,7 @@ and many more;
31
31
  ## Installation
32
32
 
33
33
  Minimum supported versions:
34
- - NodeJS: ^20.10 or >=21.2
34
+ - NodeJS: ^20.12 or >=21.7
35
35
  - ESLint: ^9.15.0 (peer dependency)
36
36
 
37
37
  ```shell
@@ -40,9 +40,9 @@ pnpm i -D eslint-config-un eslint@latest
40
40
  yarn add -D eslint-config-un eslint@latest # Yarn Berry only (v2+)
41
41
  ```
42
42
 
43
- Almost all the used plugins are direct dependencies of this package, you don't need to install them separately. We aim to update the dependencies within 1 month after their release.
43
+ Commonly used plugins are direct dependencies of this package, you don't need to install them separately. We aim to update the dependencies within 1 month after their release.
44
44
 
45
- Certain plugins are optional peer dependencies, which means that you need to install them manually if they are end up being used.
45
+ Certain plugins (usually framework/library specific ones) are optional peer dependencies, which means that you need to install them manually if they are end up being used. You need to run ESLint with our config once to find out which plugins should be installed manually.
46
46
 
47
47
  <details>
48
48
  <summary>Installation with Yarn Classic (v1)</summary>
@@ -54,21 +54,46 @@ yarn add -D https://registry.npmjs.org/eslint-config-un/-/eslint-config-un-<VERS
54
54
  ```
55
55
  </details>
56
56
 
57
-
58
-
59
57
  <details>
60
- <summary>Optional peer dependencies & reason</summary>
61
-
62
- The reason for making these plugins not coming with this package is because they have heavy non-optional peer dependencies, such as `graphql`, `storybook` and `tailwindcss`. Not only that they're heavy, but having those peer dependencies installed would make this package think that the corresponding config is used.
63
-
64
- | Default plugin prefix | Package name | Reason |
65
- | --------------------- | ------------ | ------ |
66
- | `graphql` | `@graphql-eslint/eslint-plugin` | Heavy dependency `graphql` |
67
- | `betterTailwindcss` | `eslint-plugin-better-tailwindcss` | Heavy dependency `tailwindcss` |
68
- | `storybook` | `eslint-plugin-storybook` | Heavy dependency `storybook` |
69
- | `tailwindcss` | `eslint-plugin-tailwindcss` | Heavy dependency `tailwindcss` |
70
- | `turbo` | `eslint-plugin-turbo` | Heavy dependency `turbo` |
71
- | `eslintPlugin` | `eslint-plugin-eslint-plugin` | Very specific plugin |
58
+ <summary>List of optional peer dependencies</summary>
59
+
60
+ | Default plugin prefix | Package name |
61
+ | ------------------------ | -------------------------------------- |
62
+ | `@cspell` | `@cspell/eslint-plugin` |
63
+ | `@eslint-react` | `@eslint-react/eslint-plugin` |
64
+ | `@next/next` | `@next/eslint-plugin-next` |
65
+ | `@tanstack/query` | `@tanstack/eslint-plugin-query` |
66
+ | `astro` | `eslint-plugin-astro` |
67
+ | `ava` | `eslint-plugin-ava` |
68
+ | `better-tailwindcss` | `eslint-plugin-better-tailwindcss` |
69
+ | `case-police` | `eslint-plugin-case-police` |
70
+ | `de-morgan` | `eslint-plugin-de-morgan` |
71
+ | `ember` | `eslint-plugin-ember` |
72
+ | `erasable-syntax-only` | `eslint-plugin-erasable-syntax-only` |
73
+ | `es` | `eslint-plugin-es-x` |
74
+ | `eslint-plugin` | `eslint-plugin-eslint-plugin` |
75
+ | `graphql` | `@graphql-eslint/eslint-plugin` |
76
+ | `jest-extended` | `eslint-plugin-jest-extended` |
77
+ | `jest` | `eslint-plugin-jest` |
78
+ | `perfectionist` | `eslint-plugin-perfectionist` |
79
+ | `pinia` | `eslint-plugin-pinia` |
80
+ | `playwright` | `eslint-plugin-playwright` |
81
+ | `pnpm` | `eslint-plugin-pnpm` |
82
+ | `prefer-arrow-functions` | `eslint-plugin-prefer-arrow-functions` |
83
+ | `qwik` | `eslint-plugin-qwik` |
84
+ | `react-compiler` | `eslint-plugin-react-compiler` |
85
+ | `react-hooks` | `eslint-plugin-react-hooks` |
86
+ | `react-refresh` | `eslint-plugin-react-refresh` |
87
+ | `react` | `eslint-plugin-react` |
88
+ | `solid` | `eslint-plugin-solid` |
89
+ | `storybook` | `eslint-plugin-storybook` |
90
+ | `svelte` | `eslint-plugin-svelte` |
91
+ | `tailwindcss` | `eslint-plugin-tailwindcss` |
92
+ | `testing-library` | `eslint-plugin-testing-library` |
93
+ | `turbo` | `eslint-plugin-turbo` |
94
+ | `vitest` | `@vitest/eslint-plugin` |
95
+ | `vue` | `eslint-plugin-vue` |
96
+ | `vuejs-accessibility` | `eslint-plugin-vuejs-accessibility` |
72
97
  </details>
73
98
 
74
99
  ### Usage
@@ -174,6 +199,7 @@ Sub-config is a Config located within Config's options. If the parent config is
174
199
  | ![ReactJS](./assets/devicon-react.svg) `react/dom` | ✅ (`react-dom` is installed) | [@eslint-react/eslint-plugin](https://npmjs.com/package/@eslint-react/eslint-plugin) (`@eslint-react`)<br>[eslint-plugin-react](https://npmjs.com/eslint-plugin-react) | Includes rules with `@eslint-react/dom` prefix from `@eslint-react/eslint-plugin` and DOM related rules from `eslint-plugin-react` |
175
200
  | ![ReactJS](./assets/devicon-react.svg) `react/refresh` | ✅ | [eslint-plugin-react-refresh](https://npmjs.com/eslint-plugin-react-refresh) (`react-refresh`) | - |
176
201
  | ![ReactJS](./assets/devicon-react.svg) `react/compiler` | ✅ (if React version is at least 19) | [eslint-plugin-react-compiler](https://npmjs.com/eslint-plugin-react-compiler) (`react-compiler`) | - |
202
+ | ![ReactJS](./assets/devicon-react.svg) `react/youMightNotNeedAnEffect` | ✅ | [eslint-plugin-react-you-might-not-need-an-effect](https://npmjs.com/eslint-plugin-react-you-might-not-need-an-effect) (`react-you-might-not-need-an-effect`) | Since v1.0.0 |
177
203
  | ![ReactJS](./assets/devicon-react.svg) `react/allowDefaultExportsInJsxFiles` | ✅ | - | Config that allows default exports in all JSX files |
178
204
  | ![NextJS](./assets/devicon-nextjs.svg) `nextJs` | ✅ (`next` is installed) | [@next/eslint-plugin-next](https://npmjs.com/package/@next/eslint-plugin-next) (`@next/next`) | Since v0.9.0 |
179
205
  | ![SolidJS](./assets/devicon-solidjs.svg) `solid` | ✅ (`solid-js` is installed) | [eslint-plugin-solid](https://npmjs.com/eslint-plugin-solid) (`solid`) | Since v0.10.0 |
@@ -182,6 +208,10 @@ Sub-config is a Config located within Config's options. If the parent config is
182
208
  | ![Astro](./assets/devicon-astro.svg) `astro/jsxA11y` | ✅ | ^ | Only A11Y rules from `eslint-plugin-astro` |
183
209
  | ![Svelte](./assets/devicon-svelte.svg) `svelte` | ✅ (`svelte` is installed) | [eslint-plugin-svelte](https://npmjs.com/eslint-plugin-svelte) (`svelte`) | Since v0.10.0 |
184
210
  | ![Ember](./assets/devicon-ember.svg) `ember` | ✅ (`ember-source` is installed) | [eslint-plugin-ember](https://npmjs.com/eslint-plugin-ember) (`ember`) | Since v1.0.0 |
211
+ | ![Ember](./assets/devicon-ember.svg) `ember/testFiles` | ✅ | ^ | Since v1.0.0 |
212
+ | ![Ember](./assets/devicon-ember.svg) `ember/testFiles/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
213
+ | ![Lit](./assets/logos-lit-icon.svg) `lit` | ✅ (`lit` is installed) | [eslint-plugin-lit](https://npmjs.com/eslint-plugin-lit) (`lit`) | Since v1.0.0 |
214
+ | ![Lit](./assets/logos-lit-icon.svg) `lit/a11y` | ✅ | [eslint-plugin-lit-a11y](https://npmjs.com/eslint-plugin-lit-a11y) (`lit-a11y`) | Since v1.0.0 |
185
215
  | ![TailwindCSS](./assets/devicon-tailwindcss.svg) `betterTailwind` | ✅ (`tailwindcss` is installed) | [eslint-plugin-better-tailwindcss](https://npmjs.com/eslint-plugin-better-tailwindcss) (`better-tailwindcss`) | Since v1.0.0<br>Supports v4 and v3 |
186
216
  | ![TailwindCSS](./assets/devicon-tailwindcss.svg) `tailwind` | ❌ | [eslint-plugin-tailwindcss](https://npmjs.com/eslint-plugin-tailwindcss) (`tailwindcss`) | Only supports v3 |
187
217
 
@@ -236,18 +266,34 @@ Sub-config is a Config located within Config's options. If the parent config is
236
266
 
237
267
  ### Libraries
238
268
 
239
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
240
- | -------------- | ------------------------------------------- | ------------------------------------ | ----------------- |
241
- | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
242
- | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
243
- | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
244
- | `vitest` | (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
245
- | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
246
- | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary` | (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
247
- | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
248
- | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
249
- | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress` | ✅ (`cypress` is installed) | [eslint-plugin-cypress](https://npmjs.com/eslint-plugin-cypress) (`cypress`) | Since v1.0.0 |
250
- | ![Turborepo](./assets/material-icon-theme-turborepo.svg) `turbo` | ✅ (`turbo` is installed) | [eslint-plugin-turbo](https://npmjs.com/eslint-plugin-turbo) (`turbo`) | Since v1.0.0 |
269
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
270
+ | -------------- | -------------------------------------------------------------------- | ------------------------------------ | ----------------- |
271
+ | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
272
+ | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
273
+ | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
274
+ | `jest/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
275
+ | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
276
+ | `vitest/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
277
+ | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
278
+ | `ava/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
279
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
280
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
281
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
282
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
283
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
284
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
285
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
286
+ | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
287
+ | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
288
+ | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
289
+ | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress` | ✅ (`cypress` is installed) | [eslint-plugin-cypress](https://npmjs.com/eslint-plugin-cypress) (`cypress`) | Since v1.0.0 |
290
+ | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
291
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
292
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
293
+ | ![Turborepo](./assets/material-icon-theme-turborepo.svg) `turbo` | ✅ (`turbo` is installed) | [eslint-plugin-turbo](https://npmjs.com/eslint-plugin-turbo) (`turbo`) | Since v1.0.0 |
294
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
295
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
296
+ | ![Lodash](./assets/devicon-plain-lodash.svg) `youDontNeedLodashUnderscore` | ✅ (`lodash`, `lodash-es` or `lodash.*` is installed) | [eslint-plugin-you-dont-need-lodash-underscore](https://npmjs.com/eslint-plugin-you-dont-need-lodash-underscore) (`you-dont-need-lodash-underscore`) | Since v1.0.0 |
251
297
 
252
298
  ### Miscellaneous
253
299
 
@@ -259,6 +305,7 @@ Sub-config is a Config located within Config's options. If the parent config is
259
305
  | ![CSpell](./assets/vscode-icons-file-type-cspell.svg) `cspell` | ❌ | [@cspell/eslint-plugin](https://npmjs.com/package/@cspell/eslint-plugin) (`@cspell`) | Since v1.0.0 |
260
306
  | ![ESLint](./assets/devicon-eslint.svg) `eslintPlugin` | ❌ | [eslint-plugin-eslint-plugin](https://npmjs.com/eslint-plugin-eslint-plugin) (`eslint-plugin`) | Since v1.0.0<br>For linting ESLint plugins |
261
307
  | `fileProgress` | ❌ | [eslint-plugin-file-progress](https://npmjs.com/eslint-plugin-file-progress) (`file-progress`) | Since v1.0.0<br>An ESlint plugin to print file progress |
308
+ | `compat` | ❌ | [eslint-plugin-compat](https://npmjs.com/eslint-plugin-compat) (`compat`) | Since v1.0.0 |
262
309
 
263
310
  ## How to use
264
311
 
@@ -8,7 +8,7 @@ import {
8
8
  defu,
9
9
  interopDefault,
10
10
  klona
11
- } from "./chunk-44SKJYI3.js";
11
+ } from "./chunk-T6VV7MSS.js";
12
12
 
13
13
  // src/configs/angular.ts
14
14
  import angularTemplateParser from "@angular-eslint/template-parser";
@@ -82,11 +82,11 @@ Object.entries(RULES_AVAILABILITY).forEach(([oldName, [, newName]]) => {
82
82
  oldRuleNames.set(newName, [...oldRuleNames.get(newName) || [], oldName]);
83
83
  }
84
84
  });
85
- var generateAngularPlugins = async (configOptions, installedVersion) => {
85
+ var generateAngularPlugins = async (context, configOptions, installedVersion) => {
86
86
  const latestPlugins = PACKAGES_FOR_SUPPORTED_ANGULAR_VERSIONS[LATEST_SUPPORTED_ANGULAR_VERSION];
87
87
  const [latestPlugin, latestPluginTemplate] = await Promise.all([
88
- latestPlugins.plugin(),
89
- latestPlugins.pluginTemplate()
88
+ context.rootOptions.pluginsOverrides?.["@angular-eslint"] || latestPlugins.plugin(),
89
+ context.rootOptions.pluginsOverrides?.["@angular-eslint/template"] || latestPlugins.pluginTemplate()
90
90
  ]);
91
91
  const pluginGeneral = {
92
92
  ...latestPlugin,
@@ -206,7 +206,7 @@ var angularUnConfig = async (context) => {
206
206
  extractInlineHtmlProcessorLatest,
207
207
  extractInlineHtmlProcessorV17
208
208
  ] = await Promise.all([
209
- generateAngularPlugins(optionsResolved, angularVersion),
209
+ generateAngularPlugins(context, optionsResolved, angularVersion),
210
210
  // Since v18, the processor uses `getDecorators` from `typescript` which does not exist prior to
211
211
  // v4.8 of `typescript`, which might be used in older projects
212
212
  interopDefault(import("@angular-eslint/eslint-plugin-template")).then(
@@ -1,6 +1,3 @@
1
- import {
2
- jsxA11yUnConfig
3
- } from "./chunk-I7H4HIC3.js";
4
1
  import {
5
2
  ERROR,
6
3
  GLOB_ASTRO,
@@ -10,16 +7,19 @@ import {
10
7
  defu,
11
8
  interopDefault,
12
9
  pluginsLoaders
13
- } from "./chunk-44SKJYI3.js";
10
+ } from "./chunk-T6VV7MSS.js";
14
11
 
15
12
  // src/configs/astro.ts
16
13
  var DEFAULT_ASTRO_FILES = [GLOB_ASTRO];
17
14
  var astroUnConfig = async (context) => {
18
15
  const [eslintPluginAstro, astroEslintParser, { parser: typescriptEslintParser }] = await Promise.all([
19
- pluginsLoaders.astro(context),
16
+ pluginsLoaders.astro(context).then(({ module }) => module),
20
17
  interopDefault(import("astro-eslint-parser")),
21
18
  interopDefault(import("typescript-eslint"))
22
19
  ]);
20
+ if (!eslintPluginAstro) {
21
+ return null;
22
+ }
23
23
  const optionsRaw = context.rootOptions.configs?.astro;
24
24
  const optionsResolved = defu(optionsRaw, {
25
25
  files: DEFAULT_ASTRO_FILES,
@@ -58,18 +58,21 @@ var astroUnConfig = async (context) => {
58
58
  filesFallback: DEFAULT_ASTRO_FILES
59
59
  }
60
60
  ]).addRule("missing-client-only-directive-value", ERROR).addRule("no-conflict-set-directives", ERROR).addRule("no-deprecated-astro-canonicalurl", ERROR).addRule("no-deprecated-astro-fetchcontent", ERROR).addRule("no-deprecated-astro-resolve", ERROR).addRule("no-deprecated-getentrybyslug", ERROR).addRule("no-exports-from-components", ERROR).addRule("no-unused-define-vars-in-style", ERROR).addRule("valid-compile", ERROR).addRule("no-set-html-directive", ERROR).addRule("no-set-text-directive", OFF).addRule("no-unused-css-selector", WARNING).addRule("prefer-class-list-directive", ERROR).addRule("prefer-object-class-list", ERROR).addRule("prefer-split-class-list", ERROR).addRule("sort-attributes", ERROR).addRule("semi", OFF).addOverrides();
61
- const optionsA11y = typeof configJsxA11y === "object" ? configJsxA11y : {};
62
61
  return {
63
62
  configs: [
64
63
  configBuilder,
65
- ...configJsxA11y === false ? [] : (await jsxA11yUnConfig(context, {
66
- prefix: "astro",
67
- options: {
68
- files: parentConfigFiles,
69
- ignores: parentConfigIgnores,
70
- ...optionsA11y
71
- }
72
- }))?.configs || []
64
+ ...configJsxA11y === false ? [] : await (async () => {
65
+ const { jsxA11yUnConfig } = await import("./jsx-a11y-J3V72ZWA.js");
66
+ const result = await jsxA11yUnConfig(context, {
67
+ prefix: "astro",
68
+ options: {
69
+ files: parentConfigFiles,
70
+ ignores: parentConfigIgnores,
71
+ ...typeof configJsxA11y === "object" && configJsxA11y
72
+ }
73
+ });
74
+ return result?.configs || [];
75
+ })()
73
76
  ],
74
77
  optionsResolved
75
78
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  RULES_TO_DISABLE_IN_TEST_FILES,
3
+ generateConfigNoOnlyTestsBuilder,
3
4
  generateDefaultTestFiles
4
- } from "./chunk-KEKX3JX7.js";
5
+ } from "./chunk-P5U53E6S.js";
5
6
  import {
6
7
  ERROR,
7
8
  GLOB_JS_TS_X_EXTENSION,
@@ -9,19 +10,23 @@ import {
9
10
  WARNING,
10
11
  createConfigBuilder,
11
12
  defu
12
- } from "./chunk-44SKJYI3.js";
13
+ } from "./chunk-T6VV7MSS.js";
13
14
 
14
15
  // src/configs/ava.ts
15
16
  var avaUnConfig = (context) => {
16
17
  const optionsRaw = context.rootOptions.configs?.ava;
17
- const optionsResolved = defu(optionsRaw, {});
18
- const { enforceAssertionMessage, enforceMaxAssertions } = optionsResolved;
18
+ const optionsResolved = defu(optionsRaw, {
19
+ configNoOnlyTests: false
20
+ // has `no-only-test` rule
21
+ });
22
+ const { configNoOnlyTests, enforceAssertionMessage, enforceMaxAssertions } = optionsResolved;
19
23
  const configBuilder = createConfigBuilder(context, optionsResolved, "ava");
24
+ const configFilesFallback = generateDefaultTestFiles(GLOB_JS_TS_X_EXTENSION);
20
25
  configBuilder?.addConfig([
21
26
  "ava",
22
27
  {
23
28
  includeDefaultFilesAndIgnores: true,
24
- filesFallback: generateDefaultTestFiles(GLOB_JS_TS_X_EXTENSION)
29
+ filesFallback: configFilesFallback
25
30
  }
26
31
  ]).addRule(
27
32
  "assertion-arguments",
@@ -32,8 +37,15 @@ var avaUnConfig = (context) => {
32
37
  enforceMaxAssertions == null ? OFF : ERROR,
33
38
  enforceMaxAssertions == null ? [] : [enforceMaxAssertions]
34
39
  ).addRule("no-async-fn-without-await", ERROR).addRule("no-duplicate-modifiers", ERROR).addRule("no-identical-title", ERROR).addRule("no-ignored-test-files", ERROR).addRule("no-import-test-files", ERROR).addRule("no-incorrect-deep-equal", ERROR).addRule("no-inline-assertions", ERROR).addRule("no-nested-tests", ERROR).addRule("no-only-test", ERROR).addRule("no-skip-assert", ERROR).addRule("no-skip-test", ERROR).addRule("no-todo-implementation", ERROR).addRule("no-todo-test", WARNING).addRule("no-unknown-modifiers", ERROR).addRule("prefer-async-await", ERROR).addRule("prefer-power-assert", OFF).addRule("prefer-t-regex", ERROR).addRule("test-title", ERROR).addRule("test-title-format", OFF).addRule("use-t", ERROR).addRule("use-t-throws-async-well", ERROR).addRule("use-t-well", ERROR).addRule("use-test", ERROR).addRule("use-true-false", ERROR).disableBulkRules(RULES_TO_DISABLE_IN_TEST_FILES).addOverrides();
40
+ const configBuilderNoOnlyTests = generateConfigNoOnlyTestsBuilder(
41
+ context,
42
+ "ava",
43
+ configNoOnlyTests,
44
+ optionsResolved,
45
+ { filesFallback: configFilesFallback }
46
+ );
35
47
  return {
36
- configs: [configBuilder],
48
+ configs: [configBuilder, configBuilderNoOnlyTests],
37
49
  optionsResolved
38
50
  };
39
51
  };
@@ -4,7 +4,7 @@ import {
4
4
  WARNING,
5
5
  createConfigBuilder,
6
6
  defu
7
- } from "./chunk-44SKJYI3.js";
7
+ } from "./chunk-T6VV7MSS.js";
8
8
 
9
9
  // src/configs/better-tailwind.ts
10
10
  var betterTailwindUnConfig = (context) => {
@@ -43,10 +43,10 @@ var betterTailwindUnConfig = (context) => {
43
43
  // v3 doesn't support `parentheses` syntax (`bg-(--primary)`) so there's nothing to enforce
44
44
  tailwindMajorVersion === 3 ? OFF : WARNING
45
45
  ).addRule(
46
- "multiline",
46
+ "enforce-consistent-line-wrapping",
47
47
  breakUpClassesIntoMultipleLines ? WARNING : OFF,
48
48
  breakUpClassesIntoMultipleLines ? [breakUpClassesIntoMultipleLines] : []
49
- ).addRule("no-duplicate-classes", WARNING).addRule("no-unnecessary-whitespace", WARNING).addRule("sort-classes", WARNING).addRule("no-conflicting-classes", ERROR).addRule(
49
+ ).addRule("no-duplicate-classes", WARNING).addRule("no-unnecessary-whitespace", WARNING).addRule("enforce-consistent-class-order", WARNING).addRule("no-conflicting-classes", ERROR).addRule(
50
50
  "no-restricted-classes",
51
51
  restrictedClasses?.length ? ERROR : OFF,
52
52
  restrictedClasses?.length ? [{ restrict: restrictedClasses }] : []
@@ -2,7 +2,7 @@ import {
2
2
  ERROR,
3
3
  createConfigBuilder,
4
4
  defu
5
- } from "./chunk-44SKJYI3.js";
5
+ } from "./chunk-T6VV7MSS.js";
6
6
 
7
7
  // src/configs/case-police.ts
8
8
  var casePoliceUnConfig = (context) => {
@@ -4,7 +4,7 @@ import {
4
4
  createConfigBuilder,
5
5
  defu,
6
6
  memoize
7
- } from "./chunk-44SKJYI3.js";
7
+ } from "./chunk-T6VV7MSS.js";
8
8
 
9
9
  // src/configs/es.ts
10
10
  var esUnConfig = (context, customConfig) => {
@@ -1,10 +1,13 @@
1
1
  import {
2
+ ERROR,
2
3
  GLOB_JSON,
3
4
  GLOB_JSON5,
4
5
  GLOB_JSONC,
5
6
  GLOB_TOML,
6
- GLOB_YAML
7
- } from "./chunk-44SKJYI3.js";
7
+ GLOB_YAML,
8
+ createConfigBuilder,
9
+ pick
10
+ } from "./chunk-T6VV7MSS.js";
8
11
 
9
12
  // src/configs/shared.ts
10
13
  var generateDefaultTestFiles = (extensions, { includeCypressTests } = {}) => [
@@ -22,6 +25,26 @@ var generateDefaultTestFiles = (extensions, { includeCypressTests } = {}) => [
22
25
  // 14k
23
26
  ...includeCypressTests ? [`**/*.cy.${extensions}`] : []
24
27
  ];
28
+ var generateConfigNoOnlyTestsBuilder = (context, prefix, configNoOnlyTests, parentConfig, {
29
+ filesFallback
30
+ } = {}) => {
31
+ const configBuilderNoOnlyTests = createConfigBuilder(
32
+ context,
33
+ configNoOnlyTests ? {
34
+ ...typeof parentConfig === "object" && pick(parentConfig, ["files", "ignores"]),
35
+ ...typeof configNoOnlyTests === "object" && configNoOnlyTests
36
+ } : configNoOnlyTests,
37
+ "no-only-tests"
38
+ );
39
+ configBuilderNoOnlyTests?.addConfig([
40
+ `${prefix}/no-only-tests`,
41
+ {
42
+ includeDefaultFilesAndIgnores: true,
43
+ filesFallback
44
+ }
45
+ ]).addRule("no-only-tests", ERROR).addOverrides();
46
+ return configBuilderNoOnlyTests;
47
+ };
25
48
  var RULES_TO_DISABLE_IN_TEST_FILES = [
26
49
  "no-empty-function",
27
50
  "sonarjs/no-hardcoded-ip",
@@ -138,7 +161,7 @@ var RULES_TO_DISABLE_IN_EMBEDDED_CODE_BLOCKS = [
138
161
  "unicode-bom",
139
162
  // 🟣
140
163
  // ts
141
- // won't disable: @typescript-eslint/consistent-type-imports, @typescript-eslint/no-useless-empty-export
164
+ // won't disable: ts/consistent-type-imports, ts/no-useless-empty-export
142
165
  "ts/ban-ts-comment",
143
166
  // [runtime-only]
144
167
  "ts/class-methods-use-this",
@@ -257,6 +280,7 @@ var RULES_TO_DISABLE_IN_EMBEDDED_CODE_BLOCKS = [
257
280
 
258
281
  export {
259
282
  generateDefaultTestFiles,
283
+ generateConfigNoOnlyTestsBuilder,
260
284
  RULES_TO_DISABLE_IN_TEST_FILES,
261
285
  generateConsistentTestItOptions,
262
286
  noRestrictedHtmlElementsDefault,