eslint-config-un 1.0.0-beta.4 → 1.0.0-beta.5

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 (74) hide show
  1. package/README.md +193 -132
  2. package/dist/config-un/cache.mjs +2 -2
  3. package/dist/config-un/config-utils.mjs +5 -4
  4. package/dist/config-un/config.mjs +35 -9
  5. package/dist/config-un/resolve-config-async-data.mjs +4 -4
  6. package/dist/config-un/shared.d.mts +12 -10
  7. package/dist/config-un/shared.mjs +2 -1
  8. package/dist/configs/barrel-files.d.mts +8 -0
  9. package/dist/configs/barrel-files.mjs +17 -0
  10. package/dist/configs/clsx.d.mts +23 -0
  11. package/dist/configs/clsx.mjs +18 -0
  12. package/dist/configs/e18e.d.mts +53 -0
  13. package/dist/configs/e18e.mjs +65 -0
  14. package/dist/configs/erasable-syntax-only.mjs +2 -2
  15. package/dist/configs/eslint-comments.d.mts +1 -1
  16. package/dist/configs/eslint-comments.mjs +2 -2
  17. package/dist/configs/expect-type.mjs +2 -2
  18. package/dist/configs/extra/no-stylistic-rules.d.mts +35 -2
  19. package/dist/configs/extra/no-stylistic-rules.mjs +31 -2
  20. package/dist/configs/format.d.mts +31 -0
  21. package/dist/configs/format.mjs +27 -0
  22. package/dist/configs/github-actions.d.mts +25 -0
  23. package/dist/configs/github-actions.mjs +30 -0
  24. package/dist/configs/html.mjs +4 -4
  25. package/dist/configs/index.d.mts +100 -2
  26. package/dist/configs/jest.d.mts +3 -2
  27. package/dist/configs/jest.mjs +11 -5
  28. package/dist/configs/js-inline.mjs +3 -3
  29. package/dist/configs/js.mjs +2 -2
  30. package/dist/configs/jsdoc.mjs +2 -2
  31. package/dist/configs/jsx-a11y.mjs +2 -2
  32. package/dist/configs/lockfile.d.mts +45 -0
  33. package/dist/configs/lockfile.mjs +28 -0
  34. package/dist/configs/nx.mjs +2 -2
  35. package/dist/configs/package-json.d.mts +10 -0
  36. package/dist/configs/package-json.mjs +5 -4
  37. package/dist/configs/react.mjs +4 -4
  38. package/dist/configs/shared.mjs +2 -2
  39. package/dist/configs/sql.d.mts +23 -0
  40. package/dist/configs/sql.mjs +18 -0
  41. package/dist/configs/stylistic.mjs +2 -2
  42. package/dist/configs/svelte.d.mts +12 -10
  43. package/dist/configs/svelte.mjs +8 -9
  44. package/dist/configs/tanstack-router.d.mts +8 -0
  45. package/dist/configs/tanstack-router.mjs +17 -0
  46. package/dist/configs/ts.d.mts +1 -1
  47. package/dist/configs/ts.mjs +22 -35
  48. package/dist/configs/vitest.mjs +1 -1
  49. package/dist/configs/vue.d.mts +21 -20
  50. package/dist/configs/vue.mjs +12 -10
  51. package/dist/configs/yaml.d.mts +2 -2
  52. package/dist/configs/yaml.mjs +2 -2
  53. package/dist/configs/zod.mjs +2 -2
  54. package/dist/constants.d.mts +60 -2
  55. package/dist/constants.mjs +50 -20
  56. package/dist/eslint-rules.gen.mjs +87 -18
  57. package/dist/eslint-types-fixable-only.gen.d.mts +1 -1
  58. package/dist/eslint-types-per-plugin.gen.d.mts +787 -220
  59. package/dist/eslint-types.gen.d.mts +767 -233
  60. package/dist/eslint.d.mts +2 -2
  61. package/dist/eslint.mjs +7 -11
  62. package/dist/globs.d.mts +2 -0
  63. package/dist/globs.mjs +3 -0
  64. package/dist/index.d.mts +1 -1
  65. package/dist/loaders/packages.d.mts +5 -4
  66. package/dist/loaders/parsers.d.mts +2 -0
  67. package/dist/loaders/parsers.mjs +1 -0
  68. package/dist/loaders/plugins.d.mts +114 -12
  69. package/dist/loaders/plugins.mjs +10 -2
  70. package/dist/loaders/shared.d.mts +2 -0
  71. package/dist/package.mjs +15 -6
  72. package/dist/plugin-un/rules/no-typeof-like-comparisons.mjs +1 -1
  73. package/dist/types.d.mts +1 -0
  74. package/package.json +85 -22
package/README.md CHANGED
@@ -67,59 +67,83 @@ Note that if you're using custom registry, the URL should be changed accordingly
67
67
  <details>
68
68
  <summary>List of optional peer dependencies</summary>
69
69
 
70
- | Package name | Default plugin prefix |
71
- | ---------------------------------------- | -------------------------- |
72
- | `@angular-eslint/eslint-plugin-template` | `@angular-eslint/template` |
73
- | `@angular-eslint/eslint-plugin` | `@angular-eslint` |
74
- | `@cspell/eslint-plugin` | `@cspell` |
75
- | `@darraghor/eslint-plugin-nestjs-typed` | `nestjs` |
76
- | `@docusaurus/eslint-plugin` | `docusaurus` |
77
- | `@eslint-react/eslint-plugin` | `@eslint-react` |
78
- | `@intlify/eslint-plugin-vue-i18n` | `@intlify/vue-i18n` |
79
- | `@next/eslint-plugin-next` | `@next/next` |
80
- | `@tanstack/eslint-plugin-query` | `@tanstack/query` |
81
- | `eslint-plugin-astro` | `astro` |
82
- | `eslint-plugin-ava` | `ava` |
83
- | `eslint-plugin-better-tailwindcss` | `better-tailwindcss` |
84
- | `eslint-plugin-boundaries` | `boundaries` |
85
- | `eslint-plugin-case-police` | `case-police` |
86
- | `eslint-plugin-check-file` | `check-file` |
87
- | `eslint-plugin-command` | `command` |
88
- | `eslint-plugin-de-morgan` | `de-morgan` |
89
- | `eslint-plugin-ember` | `ember` |
90
- | `eslint-plugin-erasable-syntax-only` | `erasable-syntax-only` |
91
- | `eslint-plugin-es-x` | `es` |
92
- | `eslint-plugin-eslint-plugin` | `eslint-plugin` |
93
- | `eslint-plugin-expect-type` | `expect-type` |
94
- | `eslint-plugin-fast-import` | `fast-import` |
95
- | `@graphql-eslint/eslint-plugin` | `graphql` |
96
- | `eslint-plugin-header` | `header` |
97
- | `eslint-plugin-headers` | `headers` |
98
- | `eslint-plugin-import-zod` | `import-zod` |
99
- | `eslint-plugin-jest-extended` | `jest-extended` |
100
- | `eslint-plugin-jest` | `jest` |
101
- | `@nx/eslint-plugin` | `nx` |
102
- | `eslint-plugin-perfectionist` | `perfectionist` |
103
- | `eslint-plugin-pinia` | `pinia` |
104
- | `eslint-plugin-playwright` | `playwright` |
105
- | `eslint-plugin-prefer-arrow-functions` | `prefer-arrow-functions` |
106
- | `eslint-plugin-qunit` | `qunit` |
107
- | `eslint-plugin-qwik` | `qwik` |
108
- | `eslint-plugin-react-hooks` | `react-hooks` |
109
- | `eslint-plugin-react-refresh` | `react-refresh` |
110
- | `eslint-plugin-react` | `react` |
111
- | `@smarttools/eslint-plugin-rxjs` | `rxjs` |
112
- | `eslint-plugin-solid` | `solid` |
113
- | `eslint-plugin-storybook` | `storybook` |
114
- | `eslint-plugin-svelte` | `svelte` |
115
- | `eslint-plugin-tailwindcss` | `tailwindcss` |
116
- | `eslint-plugin-testing-library` | `testing-library` |
117
- | `eslint-plugin-turbo` | `turbo` |
118
- | `@vitest/eslint-plugin` | `vitest` |
119
- | `eslint-plugin-vue-scoped-css` | `vue-scoped-css` |
120
- | `eslint-plugin-vue` | `vue` |
121
- | `eslint-plugin-vuejs-accessibility` | `vuejs-accessibility` |
122
- | `eslint-plugin-zod-x` | `zod` |
70
+ | Package name | Default plugin prefix |
71
+ | -------------------------------------------------- | ------------------------------------ |
72
+ | `@angular-eslint/eslint-plugin` | `@angular-eslint` |
73
+ | `@angular-eslint/eslint-plugin-template` | `@angular-eslint/template` |
74
+ | `@cspell/eslint-plugin` | `@cspell` |
75
+ | `@darraghor/eslint-plugin-nestjs-typed` | `nestjs` |
76
+ | `@docusaurus/eslint-plugin` | `docusaurus` |
77
+ | `@e18e/eslint-plugin` | `e18e` |
78
+ | `@eslint-react/eslint-plugin` | `@eslint-react` |
79
+ | `@graphql-eslint/eslint-plugin` | `graphql` |
80
+ | `@intlify/eslint-plugin-vue-i18n` | `@intlify/vue-i18n` |
81
+ | `@next/eslint-plugin-next` | `@next/next` |
82
+ | `@nuxt/eslint-plugin` | `nuxt` |
83
+ | `@nx/eslint-plugin` | `nx` |
84
+ | `@smarttools/eslint-plugin-rxjs` | `rxjs` |
85
+ | `@tanstack/eslint-plugin-query` | `@tanstack/query` |
86
+ | `@tanstack/eslint-plugin-router` | `@tanstack/router` |
87
+ | `@unocss/eslint-plugin` | `@unocss` |
88
+ | `@vitest/eslint-plugin` | `vitest` |
89
+ | `eslint-plugin-antfu` | `antfu` |
90
+ | `eslint-plugin-astro` | `astro` |
91
+ | `eslint-plugin-ava` | `ava` |
92
+ | `eslint-plugin-barrel-files` | `barrel-files` |
93
+ | `eslint-plugin-better-tailwindcss` | `better-tailwindcss` |
94
+ | `eslint-plugin-boundaries` | `boundaries` |
95
+ | `eslint-plugin-case-police` | `case-police` |
96
+ | `eslint-plugin-check-file` | `check-file` |
97
+ | `eslint-plugin-clsx` | `clsx` |
98
+ | `eslint-plugin-command` | `command` |
99
+ | `eslint-plugin-compat` | `compat` |
100
+ | `eslint-plugin-cypress` | `cypress` |
101
+ | `eslint-plugin-de-morgan` | `de-morgan` |
102
+ | `eslint-plugin-ember` | `ember` |
103
+ | `eslint-plugin-erasable-syntax-only` | `erasable-syntax-only` |
104
+ | `eslint-plugin-es-x` | `es` |
105
+ | `eslint-plugin-eslint-plugin` | `eslint-plugin` |
106
+ | `eslint-plugin-expect-type` | `expect-type` |
107
+ | `eslint-plugin-fast-import` | `fast-import` |
108
+ | `eslint-plugin-format` | `format` |
109
+ | `eslint-plugin-formatjs` | `formatjs` |
110
+ | `eslint-plugin-github-action` | `github-actions` |
111
+ | `eslint-plugin-header` | `header` |
112
+ | `eslint-plugin-headers` | `headers` |
113
+ | `eslint-plugin-import-zod` | `import-zod` |
114
+ | `eslint-plugin-jest` | `jest` |
115
+ | `eslint-plugin-jest-dom` | `jest-dom` |
116
+ | `eslint-plugin-jest-extended` | `jest-extended` |
117
+ | `eslint-plugin-lit` | `lit` |
118
+ | `eslint-plugin-lit-a11y` | `lit-a11y` |
119
+ | `eslint-plugin-lockfile` | `lockfile` |
120
+ | `eslint-plugin-mocha` | `mocha` |
121
+ | `eslint-plugin-perfectionist` | `perfectionist` |
122
+ | `eslint-plugin-pinia` | `pinia` |
123
+ | `eslint-plugin-playwright` | `playwright` |
124
+ | `eslint-plugin-prefer-arrow-functions` | `prefer-arrow-functions` |
125
+ | `eslint-plugin-qunit` | `qunit` |
126
+ | `eslint-plugin-qwik` | `qwik` |
127
+ | `eslint-plugin-react` | `react` |
128
+ | `eslint-plugin-react-debug` | `@eslint-react` |
129
+ | `eslint-plugin-react-hooks` | `react-hooks` |
130
+ | `eslint-plugin-react-refresh` | `react-refresh` |
131
+ | `eslint-plugin-react-you-might-not-need-an-effect` | `react-you-might-not-need-an-effect` |
132
+ | `eslint-plugin-sentences-per-line` | `sentences-per-line` |
133
+ | `eslint-plugin-solid` | `solid` |
134
+ | `eslint-plugin-sql` | `sql` |
135
+ | `eslint-plugin-storybook` | `storybook` |
136
+ | `eslint-plugin-svelte` | `svelte` |
137
+ | `eslint-plugin-tailwindcss` | `tailwindcss` |
138
+ | `eslint-plugin-testing-library` | `testing-library` |
139
+ | `eslint-plugin-tree-shaking` | `tree-shaking` |
140
+ | `eslint-plugin-turbo` | `turbo` |
141
+ | `eslint-plugin-vue` | `vue` |
142
+ | `eslint-plugin-vue-scoped-css` | `vue-scoped-css` |
143
+ | `eslint-plugin-vuejs-accessibility` | `vuejs-accessibility` |
144
+ | `eslint-plugin-wc` | `wc` |
145
+ | `eslint-plugin-you-dont-need-lodash-underscore` | `you-dont-need-lodash-underscore` |
146
+ | `eslint-plugin-zod-x` | `zod` |
123
147
 
124
148
  </details>
125
149
 
@@ -248,23 +272,28 @@ If these conditions are met, a separate Config will be created with:
248
272
 
249
273
  In the following table, Sub-configs have `/` in their names.
250
274
 
275
+ > [!WARNING]
276
+ > You will notice that oftentimes the configs are automatically enabled if certain dependency(-ies) are installed.
277
+ > This check is done by [`import-meta-resolve` package](https://npmjs.com/import-meta-resolve) and might produce false positives.
278
+ > Please [read more about this here](#how-does-exactly-eslint-config-un-knows-if-some-package-is-installed).
279
+
251
280
  ### Most popular and well known
252
281
 
253
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
254
- | --------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
255
- | ![JavaScript](./assets/devicon-javascript.svg) `js` | ✅ | [Vanilla ESLint rules](https://eslint.org/docs/latest/rules) | - |
256
- | ![TypeScript] `ts` | ✅ | [typescript-eslint](https://npmjs.com/typescript-eslint) (`ts`) | Only rules **not** requiring type information. |
257
- | ![TypeScript] `ts/typeAware` | ✅ | ^ | Only rules requiring type information. |
258
- | ![TypeScript] `ts/noTypeAssertion` | ✅ | [eslint-plugin-no-type-assertion](https://npmjs.com/eslint-plugin-no-type-assertion) (`no-type-assertion`) | - |
259
- | ![TypeScript] `ts/sortTsconfigKeys` | ❌ | - | Sort type-level and `compilerOptions` keys in tsconfig files. |
260
- | 🦄 `unicorn` | ✅ | [eslint-plugin-unicorn](https://npmjs.com/eslint-plugin-unicorn) (`unicorn`) | - |
261
- | ⭐ `regexp` | ✅ | [eslint-plugin-regexp](https://npmjs.com/eslint-plugin-regexp) (`regexp`) | - |
262
- | `promise` | ✅ | [eslint-plugin-promise](https://npmjs.com/eslint-plugin-promise) (`promise`) | - |
263
- | `import` | ✅ | [eslint-plugin-import-x] (`import`) | - |
264
- | `sonarjs` | ✅ | [eslint-plugin-sonarjs](https://npmjs.com/eslint-plugin-sonarjs) (`sonarjs`) | - |
265
- | `eslintComments` | ✅ | [@eslint-community/eslint-plugin-eslint-comments](https://npmjs.com/@eslint-community/eslint-plugin-eslint-comments) (`@eslint-community/eslint-comments`) | Since v0.1.3 |
266
- | `jsdoc` | ✅ | [eslint-plugin-jsdoc](https://npmjs.com/eslint-plugin-jsdoc) (`jsdoc`) | Since v0.3.1 |
267
- | `jsdoc/typescript` | ✅ (`ts` config is enabled) | - | Config for disabling or disabling certain rules for TypeScript files |
282
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
283
+ | --------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
284
+ | ![JavaScript](./assets/devicon-javascript.svg) `js` | ✅ | [Vanilla ESLint rules](https://eslint.org/docs/latest/rules) | - |
285
+ | ![TypeScript] `ts` | ✅ | [typescript-eslint](https://npmjs.com/typescript-eslint) (`ts`) | Only rules **not** requiring type information. |
286
+ | ![TypeScript] `ts/typeAware` | ✅ | ^ | Only rules requiring type information. |
287
+ | ![TypeScript] `ts/noTypeAssertion` | ✅ | [eslint-plugin-no-type-assertion](https://npmjs.com/eslint-plugin-no-type-assertion) (`no-type-assertion`) | - |
288
+ | ![TypeScript] `ts/sortTsconfigKeys` | ❌ | - | Sort type-level and `compilerOptions` keys in tsconfig files. |
289
+ | 🦄 `unicorn` | ✅ | [eslint-plugin-unicorn](https://npmjs.com/eslint-plugin-unicorn) (`unicorn`) | - |
290
+ | ⭐ `regexp` | ✅ | [eslint-plugin-regexp](https://npmjs.com/eslint-plugin-regexp) (`regexp`) | - |
291
+ | `promise` | ✅ | [eslint-plugin-promise](https://npmjs.com/eslint-plugin-promise) (`promise`) | - |
292
+ | `import` | ✅ | [eslint-plugin-import-x] (`import`) | - |
293
+ | `sonarjs` | ✅ | [eslint-plugin-sonarjs](https://npmjs.com/eslint-plugin-sonarjs) (`sonarjs`) | - |
294
+ | `eslintComments` | ✅ | [@eslint-community/eslint-plugin-eslint-comments](https://npmjs.com/@eslint-community/eslint-plugin-eslint-comments) (`eslint-comments`) | Since v0.1.3 |
295
+ | `jsdoc` | ✅ | [eslint-plugin-jsdoc](https://npmjs.com/eslint-plugin-jsdoc) (`jsdoc`) | Since v0.3.1 |
296
+ | `jsdoc/typescript` | ✅ (`ts` config is enabled) | - | Config for disabling or disabling certain rules for TypeScript files |
268
297
 
269
298
  ### Web frameworks & related
270
299
 
@@ -338,63 +367,71 @@ In the following table, Sub-configs have `/` in their names.
338
367
 
339
368
  ### Js/ts - miscellaneous
340
369
 
341
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
342
- | ---------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
343
- | `security` | ❌ | [eslint-plugin-security](https://npmjs.com/eslint-plugin-security) (`security`) | - |
344
- | `unusedImports` | ❌ | [eslint-plugin-unused-imports](https://npmjs.com/eslint-plugin-unused-imports) (`unused-imports`) | Since v0.7.0 |
345
- | `unusedImports/noUnusedVars` | ❌ | ^ | Disables [`no-unused-vars`](https://eslint.org/docs/latest/rules/no-unused-vars), [`ts/no-unused-vars`](https://typescript-eslint.io/rules/no-unused-vars) and [`sonarjs/no-unused-vars`](https://sonarsource.github.io/rspec/#/rspec/S1481/javascript) rules in favor of `unused-imports/no-unused-vars` |
346
- | `preferArrowFunctions` | ❌ | [eslint-plugin-prefer-arrow-functions](https://npmjs.com/eslint-plugin-prefer-arrow-functions) (`prefer-arrow-functions`) | Since v0.1.0 |
347
- | `perfectionist` | ❌ | [eslint-plugin-perfectionist](https://npmjs.com/eslint-plugin-perfectionist) (`perfectionist`) | Since v0.4.0<br>Supports sub-configs for each rule from the plugin since v1.0.0 |
348
- | `deMorgan` | ❌ | [eslint-plugin-de-morgan](https://npmjs.com/eslint-plugin-de-morgan) (`de-morgan`) | Since v0.5.0 |
349
- | `es` | ❌ | [eslint-plugin-es-x](https://npmjs.com/eslint-plugin-es-x) (`es-x`) | Since v0.10.0 |
350
- | `jsInline` | ✅ | [eslint-plugin-html](https://npmjs.com/eslint-plugin-html) (`html`) | Since v0.10.0<br>For linting inlined JS in HTML files |
351
- | `math` | ✅ | [eslint-plugin-math](https://npmjs.com/eslint-plugin-math) (`math`) | Since v1.0.0 |
352
- | `erasableSyntaxOnly` | ❌ | [eslint-plugin-erasable-syntax-only](https://npmjs.com/eslint-plugin-erasable-syntax-only) (`erasable-syntax-only`) | Since v1.0.0 |
353
- | `noUnnecessaryAbstractions` | ✅ | [eslint-plugin-unnecessary-abstractions](https://npmjs.com/eslint-plugin-unnecessary-abstractions) (`unnecessary-abstractions`) | Since v1.0.0 |
354
- | `fastImport` | ❌ | [eslint-plugin-fast-import](https://npmjs.com/eslint-plugin-fast-import) (`fast-import`) | Since v1.0.0<br>Faster `eslint-plugin-import(-x)` alternative |
355
- | `moduleInterop` | ✅ | [eslint-plugin-module-interop](https://npmjs.com/eslint-plugin-module-interop) (`module-interop`) | Since v1.0.0 |
356
- | `treeShaking` | ❌ | [eslint-plugin-tree-shaking](https://npmjs.com/eslint-plugin-tree-shaking) (`tree-shaking`) | Since v1.0.0 |
370
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
371
+ | ----------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
372
+ | `security` | ❌ | [eslint-plugin-security](https://npmjs.com/eslint-plugin-security) (`security`) | - |
373
+ | `unusedImports` | ❌ | [eslint-plugin-unused-imports](https://npmjs.com/eslint-plugin-unused-imports) (`unused-imports`) | Since v0.7.0 |
374
+ | `unusedImports/noUnusedVars` | ❌ | ^ | Disables [`no-unused-vars`](https://eslint.org/docs/latest/rules/no-unused-vars), [`ts/no-unused-vars`](https://typescript-eslint.io/rules/no-unused-vars) and [`sonarjs/no-unused-vars`](https://sonarsource.github.io/rspec/#/rspec/S1481/javascript) rules in favor of `unused-imports/no-unused-vars` |
375
+ | `preferArrowFunctions` | ❌ | [eslint-plugin-prefer-arrow-functions](https://npmjs.com/eslint-plugin-prefer-arrow-functions) (`prefer-arrow-functions`) | Since v0.1.0 |
376
+ | `perfectionist` | ❌ | [eslint-plugin-perfectionist](https://npmjs.com/eslint-plugin-perfectionist) (`perfectionist`) | Since v0.4.0<br>Supports sub-configs for each rule from the plugin since v1.0.0 |
377
+ | `deMorgan` | ❌ | [eslint-plugin-de-morgan](https://npmjs.com/eslint-plugin-de-morgan) (`de-morgan`) | Since v0.5.0 |
378
+ | `es` | ❌ | [eslint-plugin-es-x](https://npmjs.com/eslint-plugin-es-x) (`es-x`) | Since v0.10.0 |
379
+ | `jsInline` | ✅ | [eslint-plugin-html](https://npmjs.com/eslint-plugin-html) (`html`) | Since v0.10.0<br>For linting inlined JS in HTML files |
380
+ | `math` | ✅ | [eslint-plugin-math](https://npmjs.com/eslint-plugin-math) (`math`) | Since v1.0.0 |
381
+ | `erasableSyntaxOnly` | ❌ | [eslint-plugin-erasable-syntax-only](https://npmjs.com/eslint-plugin-erasable-syntax-only) (`erasable-syntax-only`) | Since v1.0.0 |
382
+ | `noUnnecessaryAbstractions` | ✅ | [eslint-plugin-unnecessary-abstractions](https://npmjs.com/eslint-plugin-unnecessary-abstractions) (`unnecessary-abstractions`) | Since v1.0.0 |
383
+ | `fastImport` | ❌ | [eslint-plugin-fast-import](https://npmjs.com/eslint-plugin-fast-import) (`fast-import`) | Since v1.0.0<br>Faster `eslint-plugin-import(-x)` alternative |
384
+ | `moduleInterop` | ✅ | [eslint-plugin-module-interop](https://npmjs.com/eslint-plugin-module-interop) (`module-interop`) | Since v1.0.0 |
385
+ | `treeShaking` | ❌ | [eslint-plugin-tree-shaking](https://npmjs.com/eslint-plugin-tree-shaking) (`tree-shaking`) | Since v1.0.0 |
386
+ | `e18e` | ❌ | [@e18e/eslint-plugin](https://npmjs.com/@e18e/eslint-plugin) | Since v1.0.0 |
387
+ | `e18e/modernization` | ✅ | ^ | |
388
+ | `e18e/moduleReplacements` | ✅ | ^ | |
389
+ | `e18e/performanceImprovements` | ✅ | ^ | |
390
+ | `e18e/performanceImprovements/typescript` | ✅ (`ts` config is enabled) | ^ | |
391
+ | `barrelFiles` | ❌ | [eslint-plugin-barrel-files](https://npmjs.com/eslint-plugin-barrel-files) (`barrel-files`) | Since v1.0.0 |
357
392
 
358
393
  ### Libraries
359
394
 
360
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
361
- | ----------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
362
- | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
363
- | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
364
- | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
365
- | `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
366
- | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
367
- | `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
368
- | `jestDom` | ✅ (`@testing-library/jest-dom` is installed) | [eslint-plugin-jest-dom](https://npmjs.com/eslint-plugin-jest-dom) (`jest-dom`) | Since v1.0.0 |
369
- | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
370
- | `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
371
- | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
372
- | `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
373
- | ![Testing Library] `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
374
- | ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
375
- | ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
376
- | ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
377
- | ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
378
- | ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
379
- | ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
380
- | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
381
- | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
382
- | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
383
- | ![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 |
384
- | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
385
- | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
386
- | ![Mocha](./assets/devicon-mocha.svg) `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
387
- | ![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 |
388
- | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
389
- | ![Playwright](./assets/devicon-playwright.svg) `playwright/noOnlyTests` | | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
390
- | ![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 |
391
- | ![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 |
392
- | ![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 |
393
- | ![Zod](./assets/logos-zod.svg) `importZod` | | [eslint-plugin-import-zod](https://npmjs.com/eslint-plugin-import-zod) (`import-zod`) | Enforces namespace imports for `zod`. You should probably use `zod` config instead.<br>Since v1.0.0 |
394
- | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
395
- | ![Zod](./assets/logos-zod.svg) `zod` | ✅ (`zod@>=4` is installed) | [eslint-plugin-zod-x](https://npmjs.com/eslint-plugin-zod-x) (`zod`) | Since v1.0.0 |
396
- | ![FormatJS](./assets/logos-formatjs.svg) `formatJs` | ✅ (`@formatjs/icu-messageformat-parser` is installed) | [eslint-plugin-formatjs](https://npmjs.com/eslint-plugin-formatjs) (`formatjs`) | Since v1.0.0 |
397
- | ![Docusaurus](./assets/vscode-icons-file-type-docusaurus.svg) `docusaurus` | ✅ (`@docusaurus/core` is installed) | [@docusaurus/eslint-plugin](https://npmjs.com/@docusaurus/eslint-plugin) (`docusaurus`) | Since v1.0.0 |
395
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
396
+ | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
397
+ | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
398
+ | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
399
+ | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
400
+ | `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
401
+ | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
402
+ | `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
403
+ | `jestDom` | ✅ (`@testing-library/jest-dom` is installed) | [eslint-plugin-jest-dom](https://npmjs.com/eslint-plugin-jest-dom) (`jest-dom`) | Since v1.0.0 |
404
+ | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
405
+ | `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
406
+ | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
407
+ | `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
408
+ | ![Testing Library] `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
409
+ | ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
410
+ | ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
411
+ | ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
412
+ | ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
413
+ | ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
414
+ | ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
415
+ | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
416
+ | ![TanStack](./assets/tanstack.png) `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
417
+ | ![TanStack](./assets/tanstack.png) `tanstackRouter` | ✅ (`@tanstack/react-router` or `@tanstack/solid-router` is installed) | [@tanstack/eslint-plugin-router](https://npmjs.com/@tanstack/eslint-plugin-router) (`@tanstack/router`) | Since v1.0.0 |
418
+ | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
419
+ | ![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 |
420
+ | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
421
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
422
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
423
+ | ![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 |
424
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
425
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright/noOnlyTests` | | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
426
+ | ![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 |
427
+ | ![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 |
428
+ | ![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 |
429
+ | ![Zod](./assets/logos-zod.svg) `importZod` | | [eslint-plugin-import-zod](https://npmjs.com/eslint-plugin-import-zod) (`import-zod`) | Enforces namespace imports for `zod`. You should probably use `zod` config instead.<br>Since v1.0.0 |
430
+ | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
431
+ | ![Zod](./assets/logos-zod.svg) `zod` | ✅ (`zod@>=4` is installed) | [eslint-plugin-zod-x](https://npmjs.com/eslint-plugin-zod-x) (`zod`) | Since v1.0.0 |
432
+ | ![FormatJS](./assets/logos-formatjs.svg) `formatJs` | ✅ (`@formatjs/icu-messageformat-parser` is installed) | [eslint-plugin-formatjs](https://npmjs.com/eslint-plugin-formatjs) (`formatjs`) | Since v1.0.0 |
433
+ | ![Docusaurus](./assets/vscode-icons-file-type-docusaurus.svg) `docusaurus` | ✅ (`@docusaurus/core` is installed) | [@docusaurus/eslint-plugin](https://npmjs.com/@docusaurus/eslint-plugin) (`docusaurus`) | Since v1.0.0 |
434
+ | `clsx` | ✅ (`clsx` is installed) | [eslint-plugin-clsx](https://npmjs.com/eslint-plugin-clsx) (`clsx`) | Since v1.0.0 |
398
435
 
399
436
  ### Miscellaneous
400
437
 
@@ -417,6 +454,10 @@ In the following table, Sub-configs have `/` in their names.
417
454
  | `expectType` | ❌ | [eslint-plugin-expect-type](https://npmjs.com/eslint-plugin-expect-type) (`expect-type`) | Since v1.0.0 |
418
455
  | `command` | ❌ | [eslint-plugin-command](https://npmjs.com/eslint-plugin-command) (`command`) | Since v1.0.0 |
419
456
  | `antfu` | ❌ | [eslint-plugin-antfu](https://npmjs.com/eslint-plugin-antfu) (`antfu`) | Since v1.0.0<br>[Anthony Fu](https://antfu.me)'s personal collection of rules. |
457
+ | `sql` | ❌ | [eslint-plugin-sql](https://npmjs.com/eslint-plugin-sql) (`sql`) | Since v1.0.0 |
458
+ | `format` | ❌ | [eslint-plugin-format](https://npmjs.com/eslint-plugin-format) (`format`) | Since v1.0.0<br>📚 Supports multiple configs |
459
+ | `lockfile` | ❌ | [eslint-plugin-lockfile](https://npmjs.com/eslint-plugin-lockfile) (`lockfile`) | Since v1.0.0 |
460
+ | ![GitHub](./assets/devicon-github.svg) `githubActions` | ✅ (`.github/workflows` directory exists) | [eslint-plugin-github-action](https://npmjs.com/eslint-plugin-github-action) (`github-actions`) | Since v1.0.0 |
420
461
 
421
462
  ## How to use
422
463
 
@@ -497,16 +538,19 @@ If you would like to rename them back or rename some other plugins, you can use
497
538
 
498
539
  #### Default renames
499
540
 
500
- | Plugin | Suggested prefix | Our prefix | Reason |
501
- | -------------------------------------------------------------------------------------------------- | ------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
502
- | [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
503
- | [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
504
- | [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
505
- | [`eslint-plugin-css`](https://npmjs.com/eslint-plugin-css) | `css` | `css-in-js` | Conflicts with [`@eslint/css`](https://npmjs.com/@eslint/css) and our name better captures the essence of the plugin |
506
- | [`eslint-plugin-jsx-a11y-x`](https://npmjs.com/eslint-plugin-jsx-a11y-x) | `jsx-a11y-x` | `jsx-a11y` | This plugin is a fork and is meant to replace the original plugin with `jsx-a11y` prefix |
507
- | [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
508
- | [`@docusaurus/eslint-plugin`](https://npmjs.com/@docusaurus/eslint-plugin) | `@docusaurus` | `docusaurus` | `@` feels unnecessary |
509
- | [`@darraghor/eslint-plugin-nestjs-typed`](https://npmjs.com/@darraghor/eslint-plugin-nestjs-typed) | `@darraghor/nestjs-typed` | `nestjs` | More concise and convenient to use |
541
+ | Plugin | Suggested prefix | Our prefix | Reason |
542
+ | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------- |
543
+ | [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
544
+ | [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
545
+ | [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
546
+ | [`eslint-plugin-css`](https://npmjs.com/eslint-plugin-css) | `css` | `css-in-js` | Conflicts with [`@eslint/css`](https://npmjs.com/@eslint/css) and our name better captures the essence of the plugin |
547
+ | [`eslint-plugin-jsx-a11y-x`](https://npmjs.com/eslint-plugin-jsx-a11y-x) | `jsx-a11y-x` | `jsx-a11y` | This plugin is a fork and is meant to replace the original plugin with `jsx-a11y` prefix |
548
+ | [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
549
+ | [`@docusaurus/eslint-plugin`](https://npmjs.com/@docusaurus/eslint-plugin) | `@docusaurus` | `docusaurus` | `@` feels unnecessary |
550
+ | [`@darraghor/eslint-plugin-nestjs-typed`](https://npmjs.com/@darraghor/eslint-plugin-nestjs-typed) | `@darraghor/nestjs-typed` | `nestjs` | More concise and convenient to use |
551
+ | [`@eslint-community/eslint-plugin-eslint-comments`](https://npmjs.com/@eslint-community/eslint-plugin-eslint-comments) | `@eslint-community/eslint-comments` | `eslint-comments` | More concise and convenient to use |
552
+ | [`eslint-plugin-github-action`](https://npmjs.com/eslint-plugin-github-action) | `github-action` | `github-actions` | Consistent with the platform name (also `-github-actions` plugin seems to not be maintained) |
553
+ | [`eslint-plugin-yml`](https://npmjs.com/eslint-plugin-yml) | `yml` | `yaml` | Consistent with the official language name (also `-yaml` plugin is much less popular) |
510
554
 
511
555
  > [!NOTE]
512
556
  > If you rename a plugin, you still have to use the original prefix within `overrides`, `overridesAny` and `extraConfigs`. eslint-config-un will rename the rules accordingly for you.
@@ -783,6 +827,10 @@ Please refer to JSDoc of exported symbols for proper documentation.
783
827
  Utility functions re-exported from [`eslint-no-restricted` package](https://npmjs.com/eslint-no-restricted) which generate `no-restricted-*` rules.
784
828
  Please refer to [the package documentation](https://github.com/bradzacher/eslint-no-restricted#readme) for more info.
785
829
 
830
+ ### `globs` entrypoint
831
+
832
+ Exports various globs that can be useful for specifying `files` or `ignores` ESLint config options.
833
+
786
834
  ## FAQ
787
835
 
788
836
  ### How do I add my own flat configs?
@@ -807,6 +855,19 @@ All the configs are placed inside `src/configs` directory.
807
855
 
808
856
  We use [`import-meta-resolve`](https://npmjs.com/import-meta-resolve) package to detect if the package is installed and resolve the path to its' `package.json`.
809
857
 
858
+ > [!WARNING]
859
+ > This tool replicates the Node.JS resolution algorithm, so there might be false positives
860
+ > on package detection if your dependencies are installed in such a way that non-direct dependencies
861
+ > can be resolved.
862
+ >
863
+ > If this is the case, at least 3 additional packages will be considered detected as installed
864
+ > regardless of whether they are actually installed in the root of your project, because they are
865
+ > sub-dependencies of eslint-config-un's direct dependencies:
866
+ >
867
+ > - `typescript` (enables `ts` config and friends);
868
+ > - `prettier` (causes Prettier-incompatible rules to be disabled);
869
+ > - `lodash` (enables `youDontNeedLodashUnderscore` config).
870
+
810
871
  ### How can I know which configs will be enabled, for which rules autofix will be disabled, etc.?
811
872
 
812
873
  You can enable the debug mode by setting `DEBUG=eslint-config-un` environment variable when running ESLint command.
@@ -1,8 +1,8 @@
1
1
  import { createTraverser, groupBy, isObject, isPlainObject, omit, readAndParseJson, readFileSafe } from "../utils.mjs";
2
+ import * as findUp from "empathic/find";
2
3
  import fs from "node:fs/promises";
3
4
  import path from "node:path";
4
5
  import crypto from "node:crypto";
5
- import * as findUp from "empathic/find";
6
6
  import * as packageUtils from "empathic/package";
7
7
  import { LOCKS } from "package-manager-detector/constants";
8
8
  import { exec } from "tinyexec";
@@ -69,7 +69,7 @@ const saveCacheToFs = async (context, cacheData) => {
69
69
  key: cacheKey,
70
70
  ...cacheData,
71
71
  usedParsers: Object.fromEntries(cacheData.usedParsers.entries()),
72
- usedPackages: Object.fromEntries([...cacheData.usedPackages.entries()].map(([packageId, entries]) => [packageId, entries.map((info) => ({
72
+ usedPackages: Object.fromEntries(Array.from(cacheData.usedPackages.entries(), ([packageId, entries]) => [packageId, entries.map((info) => ({
73
73
  ...omit(info, ["valueTransformFn", "path"]),
74
74
  property: [info.path, info.property].filter(Boolean).join("."),
75
75
  ...info.valueTransformFn && { valueTransformFn: [info.valueTransformFn.fn.toString(), info.valueTransformFn.scope] }
@@ -3,13 +3,14 @@ import semver from "semver";
3
3
 
4
4
  //#region src/config-un/config-utils.ts
5
5
  const CONFIGS_MISC_GROUP_DISABLED_BY_DEFAULT = new Set([
6
- "security",
7
- "yaml",
8
- "toml",
6
+ "e18e",
9
7
  "json",
10
8
  "jsonSchemaValidator",
9
+ "lockfile",
11
10
  "nodeDependencies",
12
- "depend"
11
+ "security",
12
+ "toml",
13
+ "yaml"
13
14
  ]);
14
15
  const CONFIGS_TO_NOT_REPORT_IF_UNNECESSARILY_ENABLED_OR_DISABLED = new Set(["fileProgress"]);
15
16
  function getIsConfigEnabled(configName, defaultConditionOrPackageInstalled = true, { preCondition, requireAllListedPackagesToBeInstalled } = {}) {