eslint-config-un 1.0.0-alpha.3 → 1.0.0-alpha.30

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 (215) hide show
  1. package/README.md +106 -32
  2. package/dist/angular-Dnj7ebe9.js +102 -0
  3. package/dist/astro-DxhnhiRZ.js +52 -0
  4. package/dist/ava-C7aqEOH3.js +23 -0
  5. package/dist/better-tailwind-NthoTpRQ.js +22 -0
  6. package/dist/case-police-CYVwMedV.js +22 -0
  7. package/dist/cli-BmZjLPSn.js +26 -0
  8. package/dist/cloudfront-functions-DSXkcpu2.js +155 -0
  9. package/dist/compat-CgpPAzV9.js +17 -0
  10. package/dist/cspell-R6rxRQDN.js +23 -0
  11. package/dist/css-DCf4KABj.js +37 -0
  12. package/dist/css-in-js-IBLt_xBv.js +22 -0
  13. package/dist/cypress-9WpcAPds.js +23 -0
  14. package/dist/de-morgan-DqBiPNc_.js +19 -0
  15. package/dist/depend-Bqi9lvQ0.js +22 -0
  16. package/dist/ember-oOWw4eUQ.js +40 -0
  17. package/dist/erasable-syntax-only-B7JSM2ao.js +20 -0
  18. package/dist/es-B2tAWFoV.js +51 -0
  19. package/dist/es-BxdIOdL7.js +4 -0
  20. package/dist/eslint-Cr9sDTGR.js +867 -0
  21. package/dist/eslint-comments-C5anAQYi.js +21 -0
  22. package/dist/eslint-plugin-DDDyeNEh.js +25 -0
  23. package/dist/file-progress-DK2VhKWW.js +17 -0
  24. package/dist/graphql-BWtYHDkE.js +104 -0
  25. package/dist/header-BSycTBso.js +22 -0
  26. package/dist/headers-CUid1unj.js +17 -0
  27. package/dist/html-D9f9Ait0.js +25 -0
  28. package/dist/import-Di1zFqQk.js +60 -0
  29. package/dist/import-zod-CvbVoI-g.js +16 -0
  30. package/dist/index.d.ts +36848 -36898
  31. package/dist/index.js +534 -568
  32. package/dist/jest-CF9ZY4Qx.js +62 -0
  33. package/dist/js-inline-B9of7DdZ.js +59 -0
  34. package/dist/js-nbs78mHH.js +94 -0
  35. package/dist/jsdoc-C2hUTuaz.js +36 -0
  36. package/dist/json-schema-validator-DNMk7_b-.js +28 -0
  37. package/dist/jsonc-DgaMIUWk.js +56 -0
  38. package/dist/jsx-a11y-yCH9HKGF.js +204 -0
  39. package/dist/lit-BBmednNN.js +30 -0
  40. package/dist/markdown-Deuh3Hkl.js +74 -0
  41. package/dist/math-gU-bYpSR.js +17 -0
  42. package/dist/mdx-B6gv5RyX.js +61 -0
  43. package/dist/mocha-CEdZZ1Ej.js +30 -0
  44. package/dist/nextjs-wT-G_3Dh.js +20 -0
  45. package/dist/no-only-tests-DDOjxN0B.js +20 -0
  46. package/dist/no-stylistic-rules-CbOhcoF4.js +4215 -0
  47. package/dist/no-unsanitized-uQukVcK8.js +16 -0
  48. package/dist/node-B4oUh5lw.js +24 -0
  49. package/dist/node-dependencies-qsv95kJx.js +25 -0
  50. package/dist/nx-BmKA92BJ.js +26 -0
  51. package/dist/package-json-SAM-8ZUT.js +65 -0
  52. package/dist/package-json-zMn6IEof.js +4 -0
  53. package/dist/perfectionist-iUY5vKZc.js +67 -0
  54. package/dist/playwright-6kHxm6o5.js +23 -0
  55. package/dist/plugin-un-kFXeMWAf.js +47 -0
  56. package/dist/pnpm-DV_8YNN-.js +36 -0
  57. package/dist/prefer-arrow-functions-CWhOCTfb.js +19 -0
  58. package/dist/promise-Dc3_rPmJ.js +22 -0
  59. package/dist/qunit-BrdUJ-0U.js +23 -0
  60. package/dist/qwik-Uq0GbzWs.js +23 -0
  61. package/dist/react-BJoxhDJs.js +238 -0
  62. package/dist/regexp-BxFZN45A.js +19 -0
  63. package/dist/rxjs-BYqq194j.js +22 -0
  64. package/dist/security-CTGitYoV.js +19 -0
  65. package/dist/shared-BJq_me6w.js +163 -0
  66. package/dist/solid-of_RNBXr.js +24 -0
  67. package/dist/sonar-DpoTbUjQ.js +28 -0
  68. package/dist/storybook-BApY_aFq.js +20 -0
  69. package/dist/svelte-D8BQH886.js +72 -0
  70. package/dist/tailwind-CbUnjHZe.js +40 -0
  71. package/dist/tanstack-query-wE2bqsTa.js +16 -0
  72. package/dist/testing-library-ErveaoBl.js +49 -0
  73. package/dist/toml-D7MXqoUj.js +30 -0
  74. package/dist/ts-DRyqhbsb.js +468 -0
  75. package/dist/turbo-CJU8hF6l.js +17 -0
  76. package/dist/un-DkKt97E-.js +19 -0
  77. package/dist/unicorn-exWgvHO8.js +25 -0
  78. package/dist/unocss-CT-t0w5k.js +16 -0
  79. package/dist/unused-imports-6pzXYvJj.js +21 -0
  80. package/dist/vitest-BjgW1yiP.js +41 -0
  81. package/dist/vue-tH6G-9Ci.js +184 -0
  82. package/dist/web-components-DApyrh-L.js +17 -0
  83. package/dist/yaml-FRKtwVx7.js +29 -0
  84. package/dist/you-dont-need-lodash-underscore-RVT4Z29o.js +100 -0
  85. package/node_modules/@pkgr/core/index.d.cts +3 -0
  86. package/node_modules/@pkgr/core/lib/constants.d.ts +8 -0
  87. package/node_modules/@pkgr/core/lib/constants.js +9 -0
  88. package/node_modules/@pkgr/core/lib/constants.js.map +1 -0
  89. package/node_modules/@pkgr/core/lib/helpers.d.ts +5 -0
  90. package/node_modules/@pkgr/core/lib/helpers.js +45 -0
  91. package/node_modules/@pkgr/core/lib/helpers.js.map +1 -0
  92. package/node_modules/@pkgr/core/lib/index.cjs +65 -0
  93. package/node_modules/@pkgr/core/lib/index.d.ts +2 -0
  94. package/node_modules/@pkgr/core/lib/index.js +3 -0
  95. package/node_modules/@pkgr/core/lib/index.js.map +1 -0
  96. package/node_modules/@pkgr/core/package.json +38 -0
  97. package/node_modules/eslint-plugin-no-type-assertion/LICENSE +21 -0
  98. package/node_modules/eslint-plugin-no-type-assertion/README.md +61 -0
  99. package/node_modules/eslint-plugin-no-type-assertion/lib/index.js +3 -0
  100. package/node_modules/eslint-plugin-no-type-assertion/lib/rules/no-type-assertion.js +55 -0
  101. package/node_modules/eslint-plugin-no-type-assertion/package.json +35 -0
  102. package/node_modules/eslint-plugin-prettier/LICENSE.md +24 -0
  103. package/node_modules/eslint-plugin-prettier/README.md +202 -0
  104. package/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.d.ts +5 -0
  105. package/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js +309 -0
  106. package/node_modules/eslint-plugin-prettier/package.json +60 -0
  107. package/node_modules/eslint-plugin-prettier/recommended.d.ts +12 -0
  108. package/node_modules/eslint-plugin-prettier/recommended.js +18 -0
  109. package/node_modules/eslint-plugin-prettier/worker.mjs +191 -0
  110. package/node_modules/fast-diff/LICENSE +201 -0
  111. package/node_modules/fast-diff/README.md +24 -0
  112. package/node_modules/fast-diff/diff.d.ts +21 -0
  113. package/node_modules/fast-diff/diff.js +1138 -0
  114. package/node_modules/fast-diff/package.json +30 -0
  115. package/node_modules/prettier-linter-helpers/.editorconfig +15 -0
  116. package/node_modules/prettier-linter-helpers/.eslintignore +2 -0
  117. package/node_modules/prettier-linter-helpers/.eslintrc.js +6 -0
  118. package/node_modules/prettier-linter-helpers/.github/CONTRIBUTING.md +41 -0
  119. package/node_modules/prettier-linter-helpers/.prettierignore +1 -0
  120. package/node_modules/prettier-linter-helpers/.prettierrc +6 -0
  121. package/node_modules/prettier-linter-helpers/.vscode/settings.json +12 -0
  122. package/node_modules/prettier-linter-helpers/LICENSE.md +24 -0
  123. package/node_modules/prettier-linter-helpers/README.md +14 -0
  124. package/node_modules/prettier-linter-helpers/index.js +145 -0
  125. package/node_modules/prettier-linter-helpers/package.json +38 -0
  126. package/node_modules/prettier-linter-helpers/test/index.test.js +29 -0
  127. package/node_modules/synckit/LICENSE +21 -0
  128. package/node_modules/synckit/README.md +256 -0
  129. package/node_modules/synckit/lib/common.d.ts +5 -0
  130. package/node_modules/synckit/lib/common.js +22 -0
  131. package/node_modules/synckit/lib/common.js.map +1 -0
  132. package/node_modules/synckit/lib/constants.d.ts +38 -0
  133. package/node_modules/synckit/lib/constants.js +54 -0
  134. package/node_modules/synckit/lib/constants.js.map +1 -0
  135. package/node_modules/synckit/lib/helpers.d.ts +27 -0
  136. package/node_modules/synckit/lib/helpers.js +413 -0
  137. package/node_modules/synckit/lib/helpers.js.map +1 -0
  138. package/node_modules/synckit/lib/index.cjs +590 -0
  139. package/node_modules/synckit/lib/index.d.cts +138 -0
  140. package/node_modules/synckit/lib/index.d.ts +7 -0
  141. package/node_modules/synckit/lib/index.js +73 -0
  142. package/node_modules/synckit/lib/index.js.map +1 -0
  143. package/node_modules/synckit/lib/types.d.ts +48 -0
  144. package/node_modules/synckit/lib/types.js +2 -0
  145. package/node_modules/synckit/lib/types.js.map +1 -0
  146. package/node_modules/synckit/package.json +45 -0
  147. package/package.json +342 -94
  148. package/deps/angular-eslint-eslint-plugin-18.4.3.tgz +0 -0
  149. package/deps/angular-eslint-eslint-plugin-template-17.5.3.tgz +0 -0
  150. package/dist/angular-PZI3A3TT.js +0 -310
  151. package/dist/astro-SPEGCL4X.js +0 -79
  152. package/dist/ava-OGL4ZYIU.js +0 -42
  153. package/dist/better-tailwind-B3H7LLD3.js +0 -61
  154. package/dist/case-police-VBM65QND.js +0 -29
  155. package/dist/chunk-A6BNKVXQ.js +0 -944
  156. package/dist/chunk-DCPED2ZM.js +0 -261
  157. package/dist/chunk-HVHXEX2N.js +0 -96
  158. package/dist/chunk-R6XLKF5J.js +0 -267
  159. package/dist/chunk-Y6GBHMX5.js +0 -137
  160. package/dist/cli-CLCDYQFQ.js +0 -37
  161. package/dist/cloudfront-functions-JNZHKWCE.js +0 -195
  162. package/dist/cspell-WUO3ZUYY.js +0 -30
  163. package/dist/css-PBPAF7WU.js +0 -57
  164. package/dist/css-in-js-F6V2FJMX.js +0 -45
  165. package/dist/cypress-GZXOIWLV.js +0 -35
  166. package/dist/de-morgan-FIQQMXXC.js +0 -20
  167. package/dist/depend-VY7OJIJK.js +0 -33
  168. package/dist/ember-QVWJPE67.js +0 -66
  169. package/dist/erasable-syntax-only-76OX5PVR.js +0 -29
  170. package/dist/es-3DTZALVI.js +0 -7
  171. package/dist/eslint-comments-PC2VOBAC.js +0 -37
  172. package/dist/eslint-plugin-BZ2G7E6F.js +0 -54
  173. package/dist/file-progress-2TB5JEAY.js +0 -29
  174. package/dist/graphql-J33QTJKH.js +0 -150
  175. package/dist/html-Q2JM45UB.js +0 -45
  176. package/dist/import-SAGZNT6U.js +0 -80
  177. package/dist/jest-HWHVJQUD.js +0 -132
  178. package/dist/js-F54BQ4AF.js +0 -87
  179. package/dist/js-inline-D4LC5F7K.js +0 -91
  180. package/dist/jsdoc-HH6UWCAO.js +0 -70
  181. package/dist/json-schema-validator-UFDHXJR6.js +0 -80
  182. package/dist/jsonc-TC5NGRVI.js +0 -55
  183. package/dist/jsx-a11y-KM73RAFZ.js +0 -7
  184. package/dist/markdown-L3THHMHN.js +0 -167
  185. package/dist/math-RYSG7JEV.js +0 -28
  186. package/dist/mdx-V2IURSRP.js +0 -127
  187. package/dist/nextjs-5DOQMIMR.js +0 -38
  188. package/dist/no-stylistic-rules-Q6NBOIKA.js +0 -7044
  189. package/dist/no-unsanitized-2KPEJSCX.js +0 -20
  190. package/dist/node-673CBR44.js +0 -60
  191. package/dist/node-dependencies-MRETNKW5.js +0 -40
  192. package/dist/package-json-2CA7EEQE.js +0 -9
  193. package/dist/perfectionist-2LFG57QU.js +0 -115
  194. package/dist/pnpm-XFEA4BGX.js +0 -63
  195. package/dist/prefer-arrow-functions-DY5UA7O6.js +0 -26
  196. package/dist/promise-3MWSL3R2.js +0 -22
  197. package/dist/qwik-QF7NLOE3.js +0 -37
  198. package/dist/react-QRLTTQM2.js +0 -521
  199. package/dist/regexp-NL27XPQR.js +0 -22
  200. package/dist/security-2NGVDTYK.js +0 -22
  201. package/dist/solid-IEWXKLHX.js +0 -43
  202. package/dist/sonar-FMNW6U2M.js +0 -35
  203. package/dist/storybook-Y7FBXLKH.js +0 -36
  204. package/dist/svelte-CAT2RYHH.js +0 -122
  205. package/dist/tailwind-6LMXE44Z.js +0 -50
  206. package/dist/tanstack-query-ALV2FXOI.js +0 -20
  207. package/dist/testing-library-WEUZZEJO.js +0 -108
  208. package/dist/toml-UCBYLOME.js +0 -53
  209. package/dist/ts-IH7HITVU.js +0 -703
  210. package/dist/turbo-MN5RGR4K.js +0 -25
  211. package/dist/unicorn-WFY6AAUO.js +0 -24
  212. package/dist/unused-imports-7I576FY2.js +0 -35
  213. package/dist/vitest-ZOAYUEWH.js +0 -81
  214. package/dist/vue-5UGWOT77.js +0 -368
  215. package/dist/yaml-BIZ6RRWD.js +0 -62
package/README.md CHANGED
@@ -31,32 +31,77 @@ 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
38
38
  npm i -D eslint-config-un eslint@latest
39
39
  pnpm i -D eslint-config-un eslint@latest
40
- yarn add -D eslint-config-un eslint@latest
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
- <summary>Optional peer dependencies & reason</summary>
49
-
50
- 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.
51
-
52
- | Default plugin prefix | Package name | Reason |
53
- | --------------------- | ------------ | ------ |
54
- | `graphql` | `@graphql-eslint/eslint-plugin` | Heavy dependency `graphql` |
55
- | `betterTailwindcss` | `eslint-plugin-better-tailwindcss` | Heavy dependency `tailwindcss` |
56
- | `storybook` | `eslint-plugin-storybook` | Heavy dependency `storybook` |
57
- | `tailwindcss` | `eslint-plugin-tailwindcss` | Heavy dependency `tailwindcss` |
58
- | `turbo` | `eslint-plugin-turbo` | Heavy dependency `turbo` |
59
- | `eslintPlugin` | `eslint-plugin-eslint-plugin` | Very specific plugin |
48
+ <summary>Installation with Yarn Classic (v1)</summary>
49
+
50
+ Yarn Classic (v1) does not support installing packages by npm name that have dependencies referenced by `file:` protocol - which we're using in this package. It fails with "Tarball is not in network and can not be located in cache" error. Installing directly from the tarball do work:
51
+
52
+ ```shell
53
+ yarn add -D https://registry.npmjs.org/eslint-config-un/-/eslint-config-un-<VERSION>.tgz eslint@latest
54
+ ```
55
+ </details>
56
+
57
+ <details>
58
+ <summary>List of optional peer dependencies</summary>
59
+
60
+ | Default plugin prefix | Package name |
61
+ | -------------------------- | ---------------------------------------- |
62
+ | `@angular-eslint` | `@angular-eslint/eslint-plugin` |
63
+ | `@angular-eslint/template` | `@angular-eslint/eslint-plugin-template` |
64
+ | `@cspell` | `@cspell/eslint-plugin` |
65
+ | `@eslint-react` | `@eslint-react/eslint-plugin` |
66
+ | `@intlify/vue-i18n` | `@intlify/eslint-plugin-vue-i18n` |
67
+ | `@next/next` | `@next/eslint-plugin-next` |
68
+ | `@tanstack/query` | `@tanstack/eslint-plugin-query` |
69
+ | `astro` | `eslint-plugin-astro` |
70
+ | `ava` | `eslint-plugin-ava` |
71
+ | `better-tailwindcss` | `eslint-plugin-better-tailwindcss` |
72
+ | `case-police` | `eslint-plugin-case-police` |
73
+ | `de-morgan` | `eslint-plugin-de-morgan` |
74
+ | `ember` | `eslint-plugin-ember` |
75
+ | `erasable-syntax-only` | `eslint-plugin-erasable-syntax-only` |
76
+ | `es` | `eslint-plugin-es-x` |
77
+ | `eslint-plugin` | `eslint-plugin-eslint-plugin` |
78
+ | `graphql` | `@graphql-eslint/eslint-plugin` |
79
+ | `header` | `eslint-plugin-header` |
80
+ | `headers` | `eslint-plugin-headers` |
81
+ | `jest-extended` | `eslint-plugin-jest-extended` |
82
+ | `jest` | `eslint-plugin-jest` |
83
+ | `nx` | `@nx/eslint-plugin` |
84
+ | `perfectionist` | `eslint-plugin-perfectionist` |
85
+ | `pinia` | `eslint-plugin-pinia` |
86
+ | `playwright` | `eslint-plugin-playwright` |
87
+ | `prefer-arrow-functions` | `eslint-plugin-prefer-arrow-functions` |
88
+ | `qunit` | `eslint-plugin-qunit` |
89
+ | `qwik` | `eslint-plugin-qwik` |
90
+ | `react-compiler` | `eslint-plugin-react-compiler` |
91
+ | `react-hooks` | `eslint-plugin-react-hooks` |
92
+ | `react-refresh` | `eslint-plugin-react-refresh` |
93
+ | `react` | `eslint-plugin-react` |
94
+ | `rxjs` | `@smarttools/eslint-plugin-rxjs` |
95
+ | `solid` | `eslint-plugin-solid` |
96
+ | `storybook` | `eslint-plugin-storybook` |
97
+ | `svelte` | `eslint-plugin-svelte` |
98
+ | `tailwindcss` | `eslint-plugin-tailwindcss` |
99
+ | `testing-library` | `eslint-plugin-testing-library` |
100
+ | `turbo` | `eslint-plugin-turbo` |
101
+ | `vitest` | `@vitest/eslint-plugin` |
102
+ | `vue` | `eslint-plugin-vue` |
103
+ | `vue-scoped-css` | `eslint-plugin-vue-scoped-css` |
104
+ | `vuejs-accessibility` | `eslint-plugin-vuejs-accessibility` |
60
105
  </details>
61
106
 
62
107
  ### Usage
@@ -118,7 +163,7 @@ type Severity = 0 | 1 | 2 | 'off' | 'warn' | 'error';
118
163
  - Sub-configs are the same as Configs, but configured within Config options. All Sub-configs use `configXXX` naming convention.
119
164
  - After evaluating all the flat configs, eslint-config-un will **load only those plugins that were actually used**, unless `loadPluginsOnDemand` option is set to `false`.
120
165
  - `files` is an array of file globs to which this Config will be applied. If you specify an empty array `[]`, the Config **will be disabled**, but not its Sub-configs.
121
- - `ignores` is exactly the same as ESLint's `ignores`.
166
+ - `ignores` is exactly the same as ESLint's `ignores`. If you specify an empty array `[]`, the default ignore list won't be used.
122
167
  - `overrides`/`overridesAny` is similar to ESLint's `rules`, but with a very important advantage: you can provide a function that will be called with the rule severity and options set by eslint-config-un, which allows you to **granularly override the options** or change the severity of each rule.
123
168
  - The only difference between `overrides` and `overridesAny` is that `overridesAny` will allow any rule to be overridden (from TypeScript's stand point; technically you can pass any rule to `overrides` too), while `overrides` will only allow those rules which are tied to the config.
124
169
  - `overridesAny` will be applied **after** `overrides`.
@@ -162,6 +207,7 @@ Sub-config is a Config located within Config's options. If the parent config is
162
207
  | ![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` |
163
208
  | ![ReactJS](./assets/devicon-react.svg) `react/refresh` | ✅ | [eslint-plugin-react-refresh](https://npmjs.com/eslint-plugin-react-refresh) (`react-refresh`) | - |
164
209
  | ![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`) | - |
210
+ | ![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 |
165
211
  | ![ReactJS](./assets/devicon-react.svg) `react/allowDefaultExportsInJsxFiles` | ✅ | - | Config that allows default exports in all JSX files |
166
212
  | ![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 |
167
213
  | ![SolidJS](./assets/devicon-solidjs.svg) `solid` | ✅ (`solid-js` is installed) | [eslint-plugin-solid](https://npmjs.com/eslint-plugin-solid) (`solid`) | Since v0.10.0 |
@@ -170,6 +216,10 @@ Sub-config is a Config located within Config's options. If the parent config is
170
216
  | ![Astro](./assets/devicon-astro.svg) `astro/jsxA11y` | ✅ | ^ | Only A11Y rules from `eslint-plugin-astro` |
171
217
  | ![Svelte](./assets/devicon-svelte.svg) `svelte` | ✅ (`svelte` is installed) | [eslint-plugin-svelte](https://npmjs.com/eslint-plugin-svelte) (`svelte`) | Since v0.10.0 |
172
218
  | ![Ember](./assets/devicon-ember.svg) `ember` | ✅ (`ember-source` is installed) | [eslint-plugin-ember](https://npmjs.com/eslint-plugin-ember) (`ember`) | Since v1.0.0 |
219
+ | ![Ember](./assets/devicon-ember.svg) `ember/testFiles` | ✅ | ^ | Since v1.0.0 |
220
+ | ![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 |
221
+ | ![Lit](./assets/logos-lit-icon.svg) `lit` | ✅ (`lit` is installed) | [eslint-plugin-lit](https://npmjs.com/eslint-plugin-lit) (`lit`) | Since v1.0.0 |
222
+ | ![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 |
173
223
  | ![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 |
174
224
  | ![TailwindCSS](./assets/devicon-tailwindcss.svg) `tailwind` | ❌ | [eslint-plugin-tailwindcss](https://npmjs.com/eslint-plugin-tailwindcss) (`tailwindcss`) | Only supports v3 |
175
225
 
@@ -224,18 +274,40 @@ Sub-config is a Config located within Config's options. If the parent config is
224
274
 
225
275
  ### Libraries
226
276
 
227
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
228
- | -------------- | ------------------------------------------- | ------------------------------------ | ----------------- |
229
- | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
230
- | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
231
- | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
232
- | `vitest` | (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
233
- | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
234
- | ![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 |
235
- | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
236
- | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
237
- | ![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 |
238
- | ![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 |
277
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
278
+ | -------------- | -------------------------------------------------------------------- | ------------------------------------ | ----------------- |
279
+ | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
280
+ | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
281
+ | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
282
+ | `jest/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
283
+ | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
284
+ | `vitest/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
285
+ | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
286
+ | `ava/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
287
+ | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
288
+ | `qunit/noOnlyTests` | | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
289
+ | ![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 |
290
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
291
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
292
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
293
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
294
+ | ![Testing Library](./assets/logos-testing-library.svg) `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
295
+ | ![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 |
296
+ | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
297
+ | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
298
+ | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
299
+ | ![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 |
300
+ | ![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 |
301
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
302
+ | ![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 |
303
+ | ![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 |
304
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
305
+ | ![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 |
306
+ | ![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 |
307
+ | ![RxJS](./assets/devicon-rxjs.svg) `rxjs` | ✅ (`rxjs` is installed) | [@smarttools/eslint-plugin-rxjs](https://npmjs.com/@smarttools/eslint-plugin-rxjs) (`rxjs`) | Since v1.0.0 |
308
+ | ![Nx](./assets/vscode-icons-file-type-light-nx.svg) `nx` | ✅ (`nx` is installed) | [@nx/eslint-plugin](https://npmjs.com/@nx/eslint-plugin) (`nx`) | Since v1.0.0 |
309
+ | `importZod` | ✅ (`zod` and `next` are installed) | [eslint-plugin-import-zod](https://npmjs.com/eslint-plugin-import-zod) (`import-zod`) | Enforces namespace imports for `zod`<br>Since v1.0.0 |
310
+ | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
239
311
 
240
312
  ### Miscellaneous
241
313
 
@@ -247,6 +319,10 @@ Sub-config is a Config located within Config's options. If the parent config is
247
319
  | ![CSpell](./assets/vscode-icons-file-type-cspell.svg) `cspell` | ❌ | [@cspell/eslint-plugin](https://npmjs.com/package/@cspell/eslint-plugin) (`@cspell`) | Since v1.0.0 |
248
320
  | ![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 |
249
321
  | `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 |
322
+ | `compat` | ❌ | [eslint-plugin-compat](https://npmjs.com/eslint-plugin-compat) (`compat`) | Since v1.0.0 |
323
+ | `webComponents` | ❌ | [eslint-plugin-wc](https://npmjs.com/eslint-plugin-wc) (`wc`) | Since v1.0.0 |
324
+ | `header` | ❌ | [eslint-plugin-header](https://npmjs.com/eslint-plugin-header) (`header`) | Since v1.0.0 |
325
+ | `headers` | ❌ | [eslint-plugin-headers](https://npmjs.com/eslint-plugin-headers) (`headers`) | Since v1.0.0 |
250
326
 
251
327
  ## How to use
252
328
 
@@ -382,9 +458,7 @@ By default, TypeScript rules will be enabled in `.vue` files if `enforceTypescri
382
458
 
383
459
  #### Angular
384
460
 
385
- We support Angular versions from 13 to 19, all at once. This is achieved by generating an ESLint plugin specifically for the detected Angular version. Internally, `@angular-eslint/eslint-plugin` of versions 19 and 18, and `@angular-eslint/eslint-plugin-template` of versions 17 and 19 are used. We smartly enable the appropriate rules for each Angular version.
386
-
387
- With this approach, we offer a unique ability to port the rules added in newer versions of `@angular-eslint/eslint-plugin*` and use them with older rules on older Angular codebases. Use `portRules` option to control which rules will be ported.
461
+ We support Angular versions from 13 to 20, all at once. You are expected to install `@angular-eslint/eslint-plugin` and `@angular-eslint/eslint-plugin-template` packages of the same major version as your Angular version, but installing a greater version would also likely work. With the latter, you can use the rules added in newer versions of `@angular-eslint/eslint-plugin*` on older Angular codebases.
388
462
 
389
463
  #### React
390
464
 
@@ -0,0 +1,102 @@
1
+ import { ERROR, GLOB_HTML, GLOB_JS_TS_X, OFF, WARNING, assignDefaults, cloneDeep, createConfigBuilder, fetchPackageInfo, interopDefault, pluginsLoaders } from "./eslint-Cr9sDTGR.js";
2
+
3
+ //#region src/configs/angular.ts
4
+ const SUPPORTED_ANGULAR_VERSIONS = [
5
+ 13,
6
+ 14,
7
+ 15,
8
+ 16,
9
+ 17,
10
+ 18,
11
+ 19,
12
+ 20
13
+ ];
14
+ const LATEST_SUPPORTED_ANGULAR_VERSION = SUPPORTED_ANGULAR_VERSIONS.at(-1);
15
+ const angularUnConfig = async (context) => {
16
+ const optionsRaw = context.rootOptions.configs?.angular;
17
+ const optionsResolved = assignDefaults(optionsRaw, {
18
+ configTemplate: true,
19
+ processInlineTemplates: true,
20
+ componentClassSuffixes: ["Component"],
21
+ componentSelector: true,
22
+ componentStylesStyle: true,
23
+ directiveClassSuffixes: ["Directive"],
24
+ directiveSelector: true,
25
+ disallowedInputPrefixes: ["on"],
26
+ disallowAttributeDecorator: false,
27
+ disallowForwardRef: false
28
+ });
29
+ const angularVersion = optionsResolved.angularVersion ?? (() => {
30
+ const majorVersion = context.packagesInfo["@angular/core"]?.versions.major;
31
+ if (majorVersion != null && majorVersion >= SUPPORTED_ANGULAR_VERSIONS[0] && majorVersion <= LATEST_SUPPORTED_ANGULAR_VERSION) return majorVersion;
32
+ return optionsRaw === true ? LATEST_SUPPORTED_ANGULAR_VERSION : null;
33
+ })();
34
+ if (angularVersion == null) return null;
35
+ const { configTemplate, processInlineTemplates, componentClassSuffixes, componentSelector, componentStylesStyle, directiveClassSuffixes, directiveSelector, disallowedInputPrefixes, disallowAttributeDecorator, disallowForwardRef, pipePrefixes } = optionsResolved;
36
+ optionsResolved.preferStandaloneComponents ??= angularVersion >= 19;
37
+ const { preferStandaloneComponents } = optionsResolved;
38
+ const forbiddenMetadataProperties = {
39
+ inputs: true,
40
+ outputs: true,
41
+ queries: true,
42
+ ...optionsResolved.forbiddenMetadataProperties
43
+ };
44
+ const configBuilderGeneral = createConfigBuilder(context, optionsResolved, "@angular-eslint");
45
+ const [angularEslintPlugin, angularEslintPluginPackageInfo, angularTemplateEslintPlugin, angularTemplateEslintPluginPackageInfo, angularTemplateParserPackageInfo, extractInlineHtmlProcessor] = await Promise.all([
46
+ pluginsLoaders["@angular-eslint"](context).then(({ module }) => module),
47
+ fetchPackageInfo("@angular-eslint/eslint-plugin"),
48
+ pluginsLoaders["@angular-eslint/template"](context).then(({ module }) => module),
49
+ fetchPackageInfo("@angular-eslint/eslint-plugin-template"),
50
+ fetchPackageInfo("@angular-eslint/template-parser"),
51
+ interopDefault(import("@angular-eslint/eslint-plugin-template")).then((m) => m.processors["extract-inline-html"]).then((processor) => {
52
+ const fixedProcessor = cloneDeep(processor);
53
+ fixedProcessor.meta ||= { name: "extract-inline-html" };
54
+ return fixedProcessor;
55
+ })
56
+ ]);
57
+ [
58
+ [angularEslintPluginPackageInfo, "@angular-eslint/eslint-plugin"],
59
+ [angularTemplateEslintPluginPackageInfo, "@angular-eslint/eslint-plugin-template"],
60
+ [angularTemplateParserPackageInfo, "@angular-eslint/template-parser"]
61
+ ].forEach(([packageInfo, packageName]) => {
62
+ if (packageInfo?.versions.major != null && packageInfo.versions.major !== angularVersion) context.logger.warn(`Your \`${packageName}\` major version (${packageInfo.versions.major}) might not be compatible with the configured (or detected) Angular major version (${angularVersion}).`);
63
+ });
64
+ const angularEslintPluginRules = Object.keys(angularEslintPlugin?.rules || {});
65
+ const getAngularEslintPluginRuleSeverity = (ruleName, severity) => [ruleName, angularEslintPlugin && !angularEslintPluginRules.includes(ruleName) ? OFF : severity];
66
+ configBuilderGeneral?.addConfig(["angular/general", {
67
+ includeDefaultFilesAndIgnores: true,
68
+ filesFallback: [GLOB_JS_TS_X]
69
+ }], { ...processInlineTemplates && { processor: extractInlineHtmlProcessor } }).addRule(...getAngularEslintPluginRuleSeverity("component-class-suffix", componentClassSuffixes.length === 0 ? OFF : ERROR), [{ ...componentClassSuffixes.length > 0 && { suffixes: componentClassSuffixes } }]).addRule(...getAngularEslintPluginRuleSeverity("component-max-inline-declarations", OFF)).addRule(...getAngularEslintPluginRuleSeverity("component-selector", componentSelector === false ? OFF : ERROR), [{
70
+ type: ["element"],
71
+ style: "kebab-case",
72
+ ...typeof componentSelector === "object" && componentSelector
73
+ }]).addRule(...getAngularEslintPluginRuleSeverity("consistent-component-styles", componentStylesStyle === false ? OFF : ERROR), [typeof componentStylesStyle === "string" ? componentStylesStyle : "string"]).addRule(...getAngularEslintPluginRuleSeverity("contextual-decorator", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("contextual-lifecycle", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("directive-class-suffix", directiveClassSuffixes.length === 0 ? OFF : ERROR), [{ ...directiveClassSuffixes.length > 0 && { suffixes: directiveClassSuffixes } }]).addRule(...getAngularEslintPluginRuleSeverity("directive-selector", directiveSelector === false ? OFF : ERROR), [{
74
+ type: ["attribute"],
75
+ style: "camelCase",
76
+ ...typeof directiveSelector === "object" && directiveSelector
77
+ }]).addRule(...getAngularEslintPluginRuleSeverity("no-async-lifecycle-method", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-attribute-decorator", disallowAttributeDecorator ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("no-conflicting-lifecycle", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-developer-preview", WARNING)).addRule(...getAngularEslintPluginRuleSeverity("no-duplicates-in-metadata-arrays", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-empty-lifecycle-method", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-experimental", WARNING)).addRule(...getAngularEslintPluginRuleSeverity("no-forward-ref", disallowForwardRef ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("no-host-metadata-property", forbiddenMetadataProperties.host ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("prefer-output-emitter-ref", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-input-prefix", ERROR), [{ prefixes: disallowedInputPrefixes }]).addRule(...getAngularEslintPluginRuleSeverity("no-input-rename", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-inputs-metadata-property", forbiddenMetadataProperties.inputs ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("no-lifecycle-call", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-output-native", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-output-on-prefix", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-output-rename", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-outputs-metadata-property", forbiddenMetadataProperties.outputs ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("no-pipe-impure", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("no-queries-metadata-property", forbiddenMetadataProperties.queries ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("no-uncalled-signals", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("pipe-prefix", ERROR), [{ prefixes: pipePrefixes }]).addRule(...getAngularEslintPluginRuleSeverity("prefer-inject", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("prefer-on-push-component-change-detection", OFF)).addRule(...getAngularEslintPluginRuleSeverity("prefer-output-readonly", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("prefer-signals", OFF)).addRule(...getAngularEslintPluginRuleSeverity("prefer-standalone", preferStandaloneComponents && angularVersion >= 17 ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("prefer-standalone-component", preferStandaloneComponents && angularVersion < 17 ? ERROR : OFF)).addRule(...getAngularEslintPluginRuleSeverity("relative-url-prefix", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("require-lifecycle-on-prototype", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("require-localize-metadata", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("runtime-localize", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("sort-keys-in-type-decorator", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("sort-lifecycle-methods", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("sort-ngmodule-metadata-arrays", OFF)).addRule(...getAngularEslintPluginRuleSeverity("use-component-selector", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("use-component-view-encapsulation", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("use-injectable-provided-in", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("use-lifecycle-interface", ERROR)).addRule(...getAngularEslintPluginRuleSeverity("use-pipe-transform-interface", ERROR)).addOverrides();
78
+ const angularTemplateEslintPluginRules = Object.keys(angularTemplateEslintPlugin?.rules || {});
79
+ const getAngularEslintTemplatePluginRuleSeverity = (ruleName, severity) => [ruleName, angularTemplateEslintPlugin && !angularTemplateEslintPluginRules.includes(ruleName) ? OFF : severity];
80
+ const configTemplateOptions = assignDefaults(configTemplate, {
81
+ a11yRules: true,
82
+ preferControlFlow: angularVersion >= 19,
83
+ preferNgSrc: false,
84
+ requireLoopIndexes: false
85
+ });
86
+ const { a11yRules, preferControlFlow, preferNgSrc, requireLoopIndexes } = configTemplateOptions;
87
+ const a11yRulesSeverity = a11yRules === true ? ERROR : a11yRules === "warn" ? WARNING : OFF;
88
+ const configBuilderTemplate = createConfigBuilder(context, configTemplate, "@angular-eslint/template");
89
+ configBuilderTemplate?.addConfig(["angular/template", {
90
+ includeDefaultFilesAndIgnores: true,
91
+ filesFallback: [GLOB_HTML],
92
+ parser: "@angular-eslint/template-parser",
93
+ doNotIgnoreHtml: true
94
+ }]).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-alt-text", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-elements-content", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-interactive-supports-focus", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-label-for", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-label-has-associated-control", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-role-has-required-aria", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-table-scope", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("accessibility-valid-aria", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("alt-text", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("attributes-order", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("banana-in-box", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("button-has-type", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("click-events-have-key-events", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("conditional-complexity", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("cyclomatic-complexity", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("elements-content", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("eqeqeq", ERROR), [{ allowNullOrUndefined: true }]).addRule(...getAngularEslintTemplatePluginRuleSeverity("i18n", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("interactive-supports-focus", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("label-has-associated-control", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("mouse-events-have-key-events", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-any", WARNING)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-autofocus", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-call-expression", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-distracting-elements", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-duplicate-attributes", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-inline-styles", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-interpolation-in-attributes", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-negated-async", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-nested-tags", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("no-positive-tabindex", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-at-empty", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-contextual-for-variables", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-control-flow", preferControlFlow ? ERROR : OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-ngsrc", preferNgSrc ? ERROR : OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-template-literal", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-self-closing-tags", OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("prefer-static-string-properties", ERROR)).addRule(...getAngularEslintTemplatePluginRuleSeverity("role-has-required-aria", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("table-scope", a11yRulesSeverity)).addRule(...getAngularEslintTemplatePluginRuleSeverity("use-track-by-function", requireLoopIndexes ? ERROR : OFF)).addRule(...getAngularEslintTemplatePluginRuleSeverity("valid-aria", a11yRulesSeverity)).addOverrides();
95
+ return {
96
+ configs: [configBuilderGeneral, configBuilderTemplate],
97
+ optionsResolved
98
+ };
99
+ };
100
+
101
+ //#endregion
102
+ export { angularUnConfig };
@@ -0,0 +1,52 @@
1
+ import { ERROR, GLOB_ASTRO, OFF, WARNING, assignDefaults, createConfigBuilder, interopDefault, pluginsLoaders } from "./eslint-Cr9sDTGR.js";
2
+
3
+ //#region src/configs/astro.ts
4
+ const DEFAULT_ASTRO_FILES = [GLOB_ASTRO];
5
+ const astroUnConfig = async (context) => {
6
+ const [eslintPluginAstro, { parser: typescriptEslintParser }] = await Promise.all([pluginsLoaders.astro(context).then(({ module }) => module), interopDefault(import("typescript-eslint"))]);
7
+ context.usedPlugins.add("astro");
8
+ if (!eslintPluginAstro) return null;
9
+ const optionsRaw = context.rootOptions.configs?.astro;
10
+ const optionsResolved = assignDefaults(optionsRaw, {
11
+ files: DEFAULT_ASTRO_FILES,
12
+ configJsxA11y: true
13
+ });
14
+ const { files: parentConfigFiles, ignores: parentConfigIgnores, configJsxA11y } = optionsResolved;
15
+ const configBuilder = createConfigBuilder(context, optionsResolved, "astro");
16
+ const isTypescriptEnabled = context.configsMeta.ts.enabled;
17
+ configBuilder?.addConfig(["astro/setup", {
18
+ filesFallback: [...DEFAULT_ASTRO_FILES, ...parentConfigFiles],
19
+ doNotIgnoreMarkdown: true,
20
+ parser: "astro-eslint-parser"
21
+ }], {
22
+ languageOptions: {
23
+ globals: eslintPluginAstro.environments.astro.globals,
24
+ parserOptions: { parser: isTypescriptEnabled ? typescriptEslintParser : void 0 },
25
+ sourceType: "module"
26
+ },
27
+ ...isTypescriptEnabled && { processor: eslintPluginAstro.processors["client-side-ts"] }
28
+ });
29
+ configBuilder?.addConfig(["astro", {
30
+ doNotIgnoreMarkdown: true,
31
+ includeDefaultFilesAndIgnores: true,
32
+ filesFallback: DEFAULT_ASTRO_FILES
33
+ }]).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();
34
+ return {
35
+ configs: [configBuilder, ...configJsxA11y === false ? [] : await (async () => {
36
+ const { jsxA11yUnConfig } = await import("./jsx-a11y-yCH9HKGF.js");
37
+ const result = await jsxA11yUnConfig(context, {
38
+ prefix: "astro",
39
+ options: {
40
+ files: parentConfigFiles,
41
+ ignores: parentConfigIgnores,
42
+ ...typeof configJsxA11y === "object" && configJsxA11y
43
+ }
44
+ });
45
+ return result?.configs || [];
46
+ })()],
47
+ optionsResolved
48
+ };
49
+ };
50
+
51
+ //#endregion
52
+ export { astroUnConfig };
@@ -0,0 +1,23 @@
1
+ import { ERROR, GLOB_JS_TS_X_EXTENSION, OFF, WARNING, assignDefaults, createConfigBuilder } from "./eslint-Cr9sDTGR.js";
2
+ import { RULES_TO_DISABLE_IN_TEST_FILES, generateConfigNoOnlyTestsBuilder, generateDefaultTestFiles } from "./shared-BJq_me6w.js";
3
+
4
+ //#region src/configs/ava.ts
5
+ const avaUnConfig = (context) => {
6
+ const optionsRaw = context.rootOptions.configs?.ava;
7
+ const optionsResolved = assignDefaults(optionsRaw, { configNoOnlyTests: false });
8
+ const { configNoOnlyTests, enforceAssertionMessage, enforceMaxAssertions } = optionsResolved;
9
+ const configBuilder = createConfigBuilder(context, optionsResolved, "ava");
10
+ const configFilesFallback = generateDefaultTestFiles(GLOB_JS_TS_X_EXTENSION);
11
+ configBuilder?.addConfig(["ava", {
12
+ includeDefaultFilesAndIgnores: true,
13
+ filesFallback: configFilesFallback
14
+ }]).addRule("assertion-arguments", ERROR, enforceAssertionMessage == null ? [] : [{ message: enforceAssertionMessage ? "always" : "never" }]).addRule("hooks-order", ERROR).addRule("max-asserts", enforceMaxAssertions == null ? OFF : ERROR, enforceMaxAssertions == null ? [] : [enforceMaxAssertions]).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();
15
+ const configBuilderNoOnlyTests = generateConfigNoOnlyTestsBuilder(context, "ava", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback });
16
+ return {
17
+ configs: [configBuilder, configBuilderNoOnlyTests],
18
+ optionsResolved
19
+ };
20
+ };
21
+
22
+ //#endregion
23
+ export { avaUnConfig };
@@ -0,0 +1,22 @@
1
+ import { ERROR, OFF, WARNING, assignDefaults, createConfigBuilder } from "./eslint-Cr9sDTGR.js";
2
+
3
+ //#region src/configs/better-tailwind.ts
4
+ const betterTailwindUnConfig = (context) => {
5
+ const optionsRaw = context.rootOptions.configs?.betterTailwind;
6
+ const optionsResolved = assignDefaults(optionsRaw, { classOrder: "official" });
7
+ const { settings: pluginSettings, breakUpClassesIntoMultipleLines, classOrder, restrictedClasses } = optionsResolved;
8
+ const tailwindPackageInfo = context.packagesInfo.tailwindcss;
9
+ const tailwindRealMajorVersion = tailwindPackageInfo?.versions.major;
10
+ const tailwindMajorVersion = tailwindRealMajorVersion === 3 ? 3 : 4;
11
+ if (tailwindRealMajorVersion === 4 && !pluginSettings?.entryPoint) context.logger.warn("[betterTailwind] You haven't specified `settings.entryPoint` option which is required for `eslint-plugin-better-tailwindcss` to work properly with Tailwind 4");
12
+ if (tailwindRealMajorVersion != null && (tailwindRealMajorVersion < 3 || tailwindRealMajorVersion > 4)) context.logger.warn("[betterTailwind] The detected Tailwind version is not supported by `eslint-plugin-better-tailwindcss`");
13
+ const configBuilder = createConfigBuilder(context, optionsResolved, "better-tailwindcss");
14
+ configBuilder?.addConfig(["better-tailwindcss", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: { "better-tailwindcss": pluginSettings } } }).addRule("enforce-consistent-variable-syntax", tailwindMajorVersion === 3 ? OFF : WARNING).addRule("enforce-consistent-line-wrapping", breakUpClassesIntoMultipleLines ? WARNING : OFF, breakUpClassesIntoMultipleLines ? [breakUpClassesIntoMultipleLines] : []).addRule("no-duplicate-classes", WARNING).addRule("no-unnecessary-whitespace", WARNING).addRule("enforce-consistent-class-order", typeof classOrder === "string" ? WARNING : OFF, typeof classOrder === "string" ? [{ order: classOrder }] : []).addRule("no-conflicting-classes", ERROR).addRule("no-restricted-classes", restrictedClasses?.length ? ERROR : OFF, restrictedClasses?.length ? [{ restrict: restrictedClasses }] : []).addRule("no-unregistered-classes", OFF).addOverrides();
15
+ return {
16
+ configs: [configBuilder],
17
+ optionsResolved
18
+ };
19
+ };
20
+
21
+ //#endregion
22
+ export { betterTailwindUnConfig };
@@ -0,0 +1,22 @@
1
+ import { ERROR, assignDefaults, createConfigBuilder } from "./eslint-Cr9sDTGR.js";
2
+
3
+ //#region src/configs/case-police.ts
4
+ const casePoliceUnConfig = (context) => {
5
+ const optionsRaw = context.rootOptions.configs?.casePolice;
6
+ const optionsResolved = assignDefaults(optionsRaw, {});
7
+ const configBuilder = createConfigBuilder(context, optionsResolved, "case-police");
8
+ configBuilder?.addConfig(["case-police", {
9
+ includeDefaultFilesAndIgnores: true,
10
+ doNotIgnoreCss: true,
11
+ doNotIgnoreHtml: true,
12
+ doNotIgnoreMarkdown: true,
13
+ doNotIgnoreMdx: true
14
+ }]).addRule("string-check", ERROR, [], { disableAutofix: true }).addOverrides();
15
+ return {
16
+ configs: [configBuilder],
17
+ optionsResolved
18
+ };
19
+ };
20
+
21
+ //#endregion
22
+ export { casePoliceUnConfig };
@@ -0,0 +1,26 @@
1
+ import { ERROR, GLOB_JS_TS_EXTENSION, assignDefaults, createConfigBuilder } from "./eslint-Cr9sDTGR.js";
2
+
3
+ //#region src/configs/extra/cli.ts
4
+ const DEFAULT_CLI_DIRS = [
5
+ "bin",
6
+ "scripts",
7
+ "cli"
8
+ ];
9
+ const DEFAULT_CLI_FILES = ["cli"];
10
+ const cliUnConfig = (context) => {
11
+ const optionsRaw = context.rootOptions.configs?.cli;
12
+ const optionsResolved = assignDefaults(optionsRaw, {});
13
+ const { onlyTopLevelDirs } = optionsResolved;
14
+ const configBuilder = createConfigBuilder(context, optionsResolved, null);
15
+ configBuilder?.addConfig(["cli", {
16
+ includeDefaultFilesAndIgnores: true,
17
+ filesFallback: [...DEFAULT_CLI_DIRS.map((dir) => `${onlyTopLevelDirs ? "" : "**/"}${dir}/**/*.${GLOB_JS_TS_EXTENSION}`), ...DEFAULT_CLI_FILES.map((file) => `${onlyTopLevelDirs ? "" : "**/"}${file}.${GLOB_JS_TS_EXTENSION}`)]
18
+ }]).disableAnyRule("node", "hashbang").disableAnyRule("node", "no-process-exit").disableAnyRule("unicorn", "no-process-exit").disableAnyRule("", "no-await-in-loop").disableAnyRule("", "no-console").disableAnyRule("import", "no-extraneous-dependencies").addAnyRule("unicorn", "prefer-top-level-await", ERROR).disableAnyRule("node", "no-top-level-await").addOverrides();
19
+ return {
20
+ configs: [configBuilder],
21
+ optionsResolved
22
+ };
23
+ };
24
+
25
+ //#endregion
26
+ export { cliUnConfig };