eslint-config-un 1.0.0-alpha.41 → 1.0.0-alpha.43

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 (103) hide show
  1. package/README.md +310 -181
  2. package/dist/{angular-BDxxVZM5.mjs → angular.mjs} +7 -3
  3. package/dist/{astro-DJztE54d.mjs → astro.mjs} +5 -2
  4. package/dist/{ava-iajbufDr.mjs → ava.mjs} +4 -2
  5. package/dist/better-tailwind.mjs +22 -0
  6. package/dist/{case-police-Amh_kVut.mjs → case-police.mjs} +3 -1
  7. package/dist/{check-file-BNyUYXXn.mjs → check-file.mjs} +4 -1
  8. package/dist/{cli-C-MysGws.mjs → cli.mjs} +3 -1
  9. package/dist/{cloudfront-functions-DxLFcqZ2.mjs → cloudfront-functions.mjs} +4 -2
  10. package/dist/{compat-CMmXwTqv.mjs → compat.mjs} +3 -1
  11. package/dist/configs.mjs +1 -0
  12. package/dist/constants.mjs +206 -0
  13. package/dist/{cspell-nRIlAKL_.mjs → cspell.mjs} +3 -1
  14. package/dist/{css-in-js-TLBrQXHc.mjs → css-in-js.mjs} +3 -1
  15. package/dist/{css-z5lcrY1D.mjs → css.mjs} +4 -1
  16. package/dist/{cypress-CURDwyIF.mjs → cypress.mjs} +4 -2
  17. package/dist/{de-morgan-C-CQFnKz.mjs → de-morgan.mjs} +3 -1
  18. package/dist/{depend-DIW4boVR.mjs → depend.mjs} +3 -1
  19. package/dist/{ember-hBwwvTEG.mjs → ember.mjs} +4 -2
  20. package/dist/{erasable-syntax-only-CUbhlZIy.mjs → erasable-syntax-only.mjs} +3 -1
  21. package/dist/es.mjs +6 -0
  22. package/dist/{es-cpR0fpEB.mjs → es2.mjs} +3 -2
  23. package/dist/{eslint-comments-BDOVbvOl.mjs → eslint-comments.mjs} +3 -1
  24. package/dist/{eslint-plugin-CAo0oWAX.mjs → eslint-plugin.mjs} +4 -2
  25. package/dist/eslint.d.mts +74315 -0
  26. package/dist/eslint.mjs +246 -0
  27. package/dist/{fast-import-Di2X86vo.mjs → fast-import.mjs} +3 -1
  28. package/dist/{file-progress-TSrGHBR_.mjs → file-progress.mjs} +3 -1
  29. package/dist/formatjs.mjs +25 -0
  30. package/dist/{graphql-Dqqfoyn9.mjs → graphql.mjs} +4 -1
  31. package/dist/{header-CpQQDKvy.mjs → header.mjs} +3 -1
  32. package/dist/{headers-BeAu0kUT.mjs → headers.mjs} +3 -1
  33. package/dist/{html-yem-t9RO.mjs → html.mjs} +4 -2
  34. package/dist/{import-zod-DkmG5sCi.mjs → import-zod.mjs} +3 -1
  35. package/dist/{import-CS9cNLNR.mjs → import.mjs} +4 -1
  36. package/dist/index.d.mts +1 -74582
  37. package/dist/index.mjs +117 -95
  38. package/dist/{jest-UuVM-MCo.mjs → jest.mjs} +6 -3
  39. package/dist/{js-inline-BGBaSVQ6.mjs → js-inline.mjs} +4 -1
  40. package/dist/{js-CMiUhbnJ.mjs → js.mjs} +4 -10
  41. package/dist/{jsdoc-eoSHy6zK.mjs → jsdoc.mjs} +5 -3
  42. package/dist/{json-schema-validator-DytE-Mb0.mjs → json-schema-validator.mjs} +4 -2
  43. package/dist/{jsonc-DH5-khG5.mjs → jsonc.mjs} +4 -2
  44. package/dist/{jsx-a11y-CsOUZ6Yb.mjs → jsx-a11y.mjs} +3 -1
  45. package/dist/{lit-CUfpnZlP.mjs → lit.mjs} +4 -2
  46. package/dist/loaders.mjs +189 -0
  47. package/dist/{markdown-links-DPkpafO9.mjs → markdown-links.mjs} +14 -4
  48. package/dist/{markdown-preferences-Bum_UN7v.mjs → markdown-preferences.mjs} +4 -1
  49. package/dist/{markdown-Bu1onP-4.mjs → markdown.mjs} +5 -2
  50. package/dist/{math-BwmJ0Err.mjs → math.mjs} +3 -1
  51. package/dist/{mdx-TC1L8aUG.mjs → mdx.mjs} +5 -2
  52. package/dist/{mocha-Gt_Ix5PH.mjs → mocha.mjs} +4 -2
  53. package/dist/{nextjs-DNyk8kdX.mjs → nextjs.mjs} +3 -1
  54. package/dist/{no-only-tests-CruyTT3N.mjs → no-only-tests.mjs} +4 -2
  55. package/dist/{no-stylistic-rules-DeXNnXAU.mjs → no-stylistic-rules.mjs} +150 -91
  56. package/dist/{no-unsanitized-CuIG0v4m.mjs → no-unsanitized.mjs} +3 -1
  57. package/dist/{node-dependencies-CPWtddO1.mjs → node-dependencies.mjs} +3 -1
  58. package/dist/{node-nZPaXk6H.mjs → node.mjs} +3 -1
  59. package/dist/{nx-wFbtI8Fj.mjs → nx.mjs} +3 -1
  60. package/dist/package-json.mjs +48 -0
  61. package/dist/{perfectionist-DtFpJED3.mjs → perfectionist.mjs} +3 -1
  62. package/dist/{playwright-H6zo-aJ8.mjs → playwright.mjs} +4 -2
  63. package/dist/{pnpm-Cz53xUEA.mjs → pnpm.mjs} +3 -1
  64. package/dist/{prefer-arrow-functions-hhIh5vfb.mjs → prefer-arrow-functions.mjs} +3 -1
  65. package/dist/{promise-CPCN8BGy.mjs → promise.mjs} +3 -1
  66. package/dist/{qunit-CqFMRi6d.mjs → qunit.mjs} +4 -2
  67. package/dist/{qwik-DZJSnpyW.mjs → qwik.mjs} +3 -1
  68. package/dist/{react-CIEbLPT4.mjs → react.mjs} +5 -3
  69. package/dist/{regexp-DNrP8zFp.mjs → regexp.mjs} +3 -1
  70. package/dist/{rxjs-HS08SJ8Q.mjs → rxjs.mjs} +3 -1
  71. package/dist/{security-7rW8gKN-.mjs → security.mjs} +3 -1
  72. package/dist/{shared-B8DbdzsW.mjs → shared.mjs} +2 -1
  73. package/dist/snippets.d.mts +39 -0
  74. package/dist/snippets.mjs +53 -0
  75. package/dist/{solid-lW0hz2V1.mjs → solid.mjs} +3 -1
  76. package/dist/{sonar-6FSqKAWE.mjs → sonar.mjs} +3 -1
  77. package/dist/{storybook-BEjjVnYM.mjs → storybook.mjs} +3 -1
  78. package/dist/stylistic.mjs +48 -0
  79. package/dist/{svelte-1zPg0OOk.mjs → svelte.mjs} +5 -2
  80. package/dist/{tailwind-CuekQ9vR.mjs → tailwind.mjs} +3 -1
  81. package/dist/{tanstack-query-Bkm95Re5.mjs → tanstack-query.mjs} +3 -1
  82. package/dist/{testing-library-BZiqvY7n.mjs → testing-library.mjs} +4 -2
  83. package/dist/{toml-Z1EBqBUD.mjs → toml.mjs} +4 -2
  84. package/dist/{ts-Cv_0fyU1.mjs → ts.mjs} +11 -2
  85. package/dist/{turbo-BslGX_n_.mjs → turbo.mjs} +3 -1
  86. package/dist/{un-B6hBbgQc.mjs → un.mjs} +3 -1
  87. package/dist/{unicorn-_M-SWcge.mjs → unicorn.mjs} +4 -2
  88. package/dist/{unnecessary-abstractions-BR3F4JAO.mjs → unnecessary-abstractions.mjs} +3 -1
  89. package/dist/{unocss-CNkapQEA.mjs → unocss.mjs} +3 -1
  90. package/dist/{unused-imports-CiddkB9L.mjs → unused-imports.mjs} +3 -1
  91. package/dist/{configs-CV8-VDvv.mjs → utils.mjs} +3 -636
  92. package/dist/{vitest-APPqLJ6g.mjs → vitest.mjs} +5 -2
  93. package/dist/{vue-D3efhiP-.mjs → vue.mjs} +30 -10
  94. package/dist/{web-components-COP845HC.mjs → web-components.mjs} +3 -1
  95. package/dist/{yaml-mRkeh0Px.mjs → yaml.mjs} +4 -2
  96. package/dist/{you-dont-need-lodash-underscore-CD4N6XA2.mjs → you-dont-need-lodash-underscore.mjs} +3 -1
  97. package/dist/{zod-zyEbMThL.mjs → zod.mjs} +3 -1
  98. package/node_modules/eslint-plugin-no-type-assertion/CHANGELOG.md +27 -0
  99. package/package.json +119 -99
  100. package/dist/better-tailwind-CjXSRdt1.mjs +0 -20
  101. package/dist/es-CpVYffBd.mjs +0 -4
  102. package/dist/package-json-Dn4SjZYU.mjs +0 -46
  103. /package/dist/{plugin-un-BKEOvdLn.mjs → plugin-un.mjs} +0 -0
package/README.md CHANGED
@@ -23,10 +23,11 @@ Grown out of the personal collection of rules, an ESLint config aspiring to cove
23
23
  - **Zero configuration by default:** exporting `eslintConfig()` from `eslint.config.ts` is enough to get started;
24
24
  - **Strictly typed:** all the options and rule names exist in TypeScript types;
25
25
  - **Well documented:** every single config, sub-config and their options are documented in JSDoc format;
26
- - **Respects your `.gitignore`**: those files are not linted by default.
26
+ - **Respects your root `.gitignore`**: specified files are not linted by default.
27
27
  - Provides the ability **to disable autofix** on a per-rule basis.
28
28
  - **Works great with Prettier**: conflicting rules are disabled if you use Prettier.
29
29
  - **Rename plugin prefixes** easily if you would like to.
30
+ - **Bring your own plugins** and their rules will also be typed as much as it's possible to.
30
31
 
31
32
  ## Installation
32
33
 
@@ -41,72 +42,74 @@ pnpm i -D eslint-config-un eslint@latest
41
42
  yarn add -D eslint-config-un eslint@latest # Yarn Berry only (v2+)
42
43
  ```
43
44
 
44
- 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.
45
+ 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. You can always override plugins' implementation with [`pluginOverrides` option](#pluginoverrides) or using your package manager's overrides functionality.
45
46
 
46
47
  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.
47
48
 
48
49
  <details>
49
50
  <summary>Installation with Yarn Classic (v1)</summary>
50
51
 
51
- 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:
52
+ 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 does work:
52
53
 
53
54
  ```sh
54
55
  yarn add -D https://registry.npmjs.org/eslint-config-un/-/eslint-config-un-<VERSION>.tgz eslint@latest
55
56
  ```
56
57
 
58
+ Note that if you're using custom registry, the URL should be changed accordingly.
59
+
57
60
  </details>
58
61
 
59
62
  <details>
60
63
  <summary>List of optional peer dependencies</summary>
61
64
 
62
- | Default plugin prefix | Package name |
63
- | -------------------------- | ---------------------------------------- |
64
- | `@angular-eslint` | `@angular-eslint/eslint-plugin` |
65
- | `@angular-eslint/template` | `@angular-eslint/eslint-plugin-template` |
66
- | `@cspell` | `@cspell/eslint-plugin` |
67
- | `@eslint-react` | `@eslint-react/eslint-plugin` |
68
- | `@intlify/vue-i18n` | `@intlify/eslint-plugin-vue-i18n` |
69
- | `@next/next` | `@next/eslint-plugin-next` |
70
- | `@tanstack/query` | `@tanstack/eslint-plugin-query` |
71
- | `astro` | `eslint-plugin-astro` |
72
- | `ava` | `eslint-plugin-ava` |
73
- | `better-tailwindcss` | `eslint-plugin-better-tailwindcss` |
74
- | `case-police` | `eslint-plugin-case-police` |
75
- | `check-file` | `eslint-plugin-check-file` |
76
- | `de-morgan` | `eslint-plugin-de-morgan` |
77
- | `ember` | `eslint-plugin-ember` |
78
- | `erasable-syntax-only` | `eslint-plugin-erasable-syntax-only` |
79
- | `es` | `eslint-plugin-es-x` |
80
- | `eslint-plugin` | `eslint-plugin-eslint-plugin` |
81
- | `fast-import` | `eslint-plugin-fast-import` |
82
- | `graphql` | `@graphql-eslint/eslint-plugin` |
83
- | `header` | `eslint-plugin-header` |
84
- | `headers` | `eslint-plugin-headers` |
85
- | `import-zod` | `eslint-plugin-import-zod` |
86
- | `jest-extended` | `eslint-plugin-jest-extended` |
87
- | `jest` | `eslint-plugin-jest` |
88
- | `nx` | `@nx/eslint-plugin` |
89
- | `perfectionist` | `eslint-plugin-perfectionist` |
90
- | `pinia` | `eslint-plugin-pinia` |
91
- | `playwright` | `eslint-plugin-playwright` |
92
- | `prefer-arrow-functions` | `eslint-plugin-prefer-arrow-functions` |
93
- | `qunit` | `eslint-plugin-qunit` |
94
- | `qwik` | `eslint-plugin-qwik` |
95
- | `react-hooks` | `eslint-plugin-react-hooks` |
96
- | `react-refresh` | `eslint-plugin-react-refresh` |
97
- | `react` | `eslint-plugin-react` |
98
- | `rxjs` | `@smarttools/eslint-plugin-rxjs` |
99
- | `solid` | `eslint-plugin-solid` |
100
- | `storybook` | `eslint-plugin-storybook` |
101
- | `svelte` | `eslint-plugin-svelte` |
102
- | `tailwindcss` | `eslint-plugin-tailwindcss` |
103
- | `testing-library` | `eslint-plugin-testing-library` |
104
- | `turbo` | `eslint-plugin-turbo` |
105
- | `vitest` | `@vitest/eslint-plugin` |
106
- | `vue` | `eslint-plugin-vue` |
107
- | `vue-scoped-css` | `eslint-plugin-vue-scoped-css` |
108
- | `vuejs-accessibility` | `eslint-plugin-vuejs-accessibility` |
109
- | `zod` | `eslint-plugin-zod-x` |
65
+ | Package name | Default plugin prefix |
66
+ | ---------------------------------------- | -------------------------- |
67
+ | `@angular-eslint/eslint-plugin-template` | `@angular-eslint/template` |
68
+ | `@angular-eslint/eslint-plugin` | `@angular-eslint` |
69
+ | `@cspell/eslint-plugin` | `@cspell` |
70
+ | `@eslint-react/eslint-plugin` | `@eslint-react` |
71
+ | `@intlify/eslint-plugin-vue-i18n` | `@intlify/vue-i18n` |
72
+ | `@next/eslint-plugin-next` | `@next/next` |
73
+ | `@tanstack/eslint-plugin-query` | `@tanstack/query` |
74
+ | `eslint-plugin-astro` | `astro` |
75
+ | `eslint-plugin-ava` | `ava` |
76
+ | `eslint-plugin-better-tailwindcss` | `better-tailwindcss` |
77
+ | `eslint-plugin-case-police` | `case-police` |
78
+ | `eslint-plugin-check-file` | `check-file` |
79
+ | `eslint-plugin-de-morgan` | `de-morgan` |
80
+ | `eslint-plugin-ember` | `ember` |
81
+ | `eslint-plugin-erasable-syntax-only` | `erasable-syntax-only` |
82
+ | `eslint-plugin-es-x` | `es` |
83
+ | `eslint-plugin-eslint-plugin` | `eslint-plugin` |
84
+ | `eslint-plugin-fast-import` | `fast-import` |
85
+ | `@graphql-eslint/eslint-plugin` | `graphql` |
86
+ | `eslint-plugin-header` | `header` |
87
+ | `eslint-plugin-headers` | `headers` |
88
+ | `eslint-plugin-import-zod` | `import-zod` |
89
+ | `eslint-plugin-jest-extended` | `jest-extended` |
90
+ | `eslint-plugin-jest` | `jest` |
91
+ | `@nx/eslint-plugin` | `nx` |
92
+ | `eslint-plugin-perfectionist` | `perfectionist` |
93
+ | `eslint-plugin-pinia` | `pinia` |
94
+ | `eslint-plugin-playwright` | `playwright` |
95
+ | `eslint-plugin-prefer-arrow-functions` | `prefer-arrow-functions` |
96
+ | `eslint-plugin-qunit` | `qunit` |
97
+ | `eslint-plugin-qwik` | `qwik` |
98
+ | `eslint-plugin-react-hooks` | `react-hooks` |
99
+ | `eslint-plugin-react-refresh` | `react-refresh` |
100
+ | `eslint-plugin-react` | `react` |
101
+ | `@smarttools/eslint-plugin-rxjs` | `rxjs` |
102
+ | `eslint-plugin-solid` | `solid` |
103
+ | `eslint-plugin-storybook` | `storybook` |
104
+ | `eslint-plugin-svelte` | `svelte` |
105
+ | `eslint-plugin-tailwindcss` | `tailwindcss` |
106
+ | `eslint-plugin-testing-library` | `testing-library` |
107
+ | `eslint-plugin-turbo` | `turbo` |
108
+ | `@vitest/eslint-plugin` | `vitest` |
109
+ | `eslint-plugin-vue-scoped-css` | `vue-scoped-css` |
110
+ | `eslint-plugin-vue` | `vue` |
111
+ | `eslint-plugin-vuejs-accessibility` | `vuejs-accessibility` |
112
+ | `eslint-plugin-zod-x` | `zod` |
110
113
 
111
114
  </details>
112
115
 
@@ -127,9 +130,9 @@ export default eslintConfig({
127
130
 
128
131
  ## List of configs
129
132
 
130
- eslint-config-un has a concept of Configs and Sub-configs. They are similar to ESLint flat config objects, but not the quite the same.
133
+ eslint-config-un has a concept of Configs and Sub-configs, further referred to as Configs. They are similar to ESLint flat config objects, but with some useful extensions. Every Config is *usually* tied to a one or more ESLint plugins produces one or more ESLint flat config items.
131
134
 
132
- You can enable any Config by setting it to `true` or an object with the Config's options. Passing `false` disables the Config.
135
+ You can enable any Config by setting it to `true` or an object with the Config's options. Passing `false` disables the Config. Passing an empty array to `files` disables the Config, but not its' Sub-configs.
133
136
 
134
137
  <details>
135
138
  <summary>Config interface & docs</summary>
@@ -158,45 +161,46 @@ type UnConfig =
158
161
 
159
162
  [`config${string}`]: UnConfig; // These are Sub-configs
160
163
 
161
- [customOptions: string]: unknown; // Custom config options, individual for each config
164
+ [customOptions: string]: unknown; // Custom options, individual for each Config
162
165
  };
163
166
 
164
167
  type Severity = 0 | 1 | 2 | 'off' | 'warn' | 'error';
165
168
  ```
166
169
 
167
- - The Config is usually tied to a one or more ESLint plugins and produces one or more ESLint flat config objects.
170
+ </details>
171
+
172
+ <br>
173
+
168
174
  - Sub-configs are the same as Configs, but configured within Config options. All Sub-configs use `configXXX` naming convention.
169
175
  - 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`.
170
- - `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.
171
- - `ignores` is exactly the same as ESLint's `ignores`. If you specify an empty array `[]`, the default ignore list won't be used.
176
+ - `files` and `ignores` have exactly the same meaning as the corresponding ESLint flat config item properties, with the only difference being an empty array `[]` handling:
177
+ - If you specify an empty array for `files`, the Config **will be disabled**, but of its' Sub-configs remain unaffected.
178
+ - If you specify an empty array for `ignores`, the default ignore list won't be used.
172
179
  - `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.
173
- - 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.
174
- - `overridesAny` will be applied **after** `overrides`.
180
+ - The 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.
181
+ - `overridesAny` will be applied **after** `overrides`.
175
182
  - `forceSeverity` allows to bulk override the severity of all the rules not overridden via `overrides` or `overridesAny`.
183
+ - Custom options are individual for each Config and are documented in JSDoc format.
176
184
 
177
- </details>
178
-
179
- <br>
180
-
181
- Sub-config is a Config located within Config's options. If the parent config is disabled, all its Sub-configs are disabled too. In the following table, Sub-configs have `/` in their names.
185
+ Sub-config is a Config located within Config's options. If the parent config is disabled by passing `false`, all its' Sub-configs are disabled too. In the following table, Sub-configs have `/` in their names.
182
186
 
183
187
  ### Most popular and well known
184
188
 
185
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
186
- | --------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------- |
187
- | ![JavaScript](./assets/devicon-javascript.svg) `js` | ✅ | [Vanilla ESLint rules](https://eslint.org/docs/latest/rules) | - |
188
- | ![TypeScript] `ts` | ✅ | [typescript-eslint](https://npmjs.com/typescript-eslint) (`ts`) | Only rules **not** requiring type information. |
189
- | ![TypeScript] `ts/typeAware` | ✅ | ^ | Only rules requiring type information. |
190
- | ![TypeScript] `ts/noTypeAssertion` | ✅ | [eslint-plugin-no-type-assertion](https://npmjs.com/eslint-plugin-no-type-assertion) (`no-type-assertion`) | - |
191
- | ![TypeScript] `ts/sortTsconfigKeys` | ❌ | - | Sort type-level and `compilerOptions` keys in tsconfig files. |
192
- | 🦄 `unicorn` | ✅ | [eslint-plugin-unicorn](https://npmjs.com/eslint-plugin-unicorn) (`unicorn`) | - |
193
- | ⭐ `regexp` | ✅ | [eslint-plugin-regexp](https://npmjs.com/eslint-plugin-regexp) (`regexp`) | - |
194
- | `promise` | ✅ | [eslint-plugin-promise](https://npmjs.com/eslint-plugin-promise) (`promise`) | - |
195
- | `import` | ✅ | [eslint-plugin-import-x] (`import`) | - |
196
- | `sonarjs` | ✅ | [eslint-plugin-sonarjs](https://npmjs.com/eslint-plugin-sonarjs) (`sonarjs`) | - |
197
- | `eslintComments` | ✅ | [@eslint-community/eslint-plugin-eslint-comments](https://npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) (`@eslint-community/eslint-comments`) | Since v0.1.3 |
198
- | `jsdoc` | ✅ | [eslint-plugin-jsdoc](https://npmjs.com/eslint-plugin-jsdoc) (`jsdoc`) | Since v0.3.1 |
199
- | `jsdoc/typescript` | ✅ (`ts` config is enabled) | - | Config for disabling or disabling certain rules for TypeScript files |
189
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
190
+ | --------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
191
+ | ![JavaScript](./assets/devicon-javascript.svg) `js` | ✅ | [Vanilla ESLint rules](https://eslint.org/docs/latest/rules) | - |
192
+ | ![TypeScript] `ts` | ✅ | [typescript-eslint](https://npmjs.com/typescript-eslint) (`ts`) | Only rules **not** requiring type information. |
193
+ | ![TypeScript] `ts/typeAware` | ✅ | ^ | Only rules requiring type information. |
194
+ | ![TypeScript] `ts/noTypeAssertion` | ✅ | [eslint-plugin-no-type-assertion](https://npmjs.com/eslint-plugin-no-type-assertion) (`no-type-assertion`) | - |
195
+ | ![TypeScript] `ts/sortTsconfigKeys` | ❌ | - | Sort type-level and `compilerOptions` keys in tsconfig files. |
196
+ | 🦄 `unicorn` | ✅ | [eslint-plugin-unicorn](https://npmjs.com/eslint-plugin-unicorn) (`unicorn`) | - |
197
+ | ⭐ `regexp` | ✅ | [eslint-plugin-regexp](https://npmjs.com/eslint-plugin-regexp) (`regexp`) | - |
198
+ | `promise` | ✅ | [eslint-plugin-promise](https://npmjs.com/eslint-plugin-promise) (`promise`) | - |
199
+ | `import` | ✅ | [eslint-plugin-import-x] (`import`) | - |
200
+ | `sonarjs` | ✅ | [eslint-plugin-sonarjs](https://npmjs.com/eslint-plugin-sonarjs) (`sonarjs`) | - |
201
+ | `eslintComments` | ✅ | [@eslint-community/eslint-plugin-eslint-comments](https://npmjs.com/@eslint-community/eslint-plugin-eslint-comments) (`@eslint-community/eslint-comments`) | Since v0.1.3 |
202
+ | `jsdoc` | ✅ | [eslint-plugin-jsdoc](https://npmjs.com/eslint-plugin-jsdoc) (`jsdoc`) | Since v0.3.1 |
203
+ | `jsdoc/typescript` | ✅ (`ts` config is enabled) | - | Config for disabling or disabling certain rules for TypeScript files |
200
204
 
201
205
  ### Web frameworks & related
202
206
 
@@ -204,9 +208,11 @@ Sub-config is a Config located within Config's options. If the parent config is
204
208
  | ---------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
205
209
  | ![VueJS] `vue` | ✅ (`vue` is installed) | [eslint-plugin-vue](https://npmjs.com/eslint-plugin-vue) (`vue`) | - |
206
210
  | ![VueJS] `vue/a11y` | ✅ | [eslint-plugin-vuejs-accessibility](https://npmjs.com/eslint-plugin-vuejs-accessibility) (`vuejs-accessibility`) | - |
211
+ | ![Nuxt](./assets/devicon-nuxt.svg) `vue/nuxt` | ✅ (`nuxt` is installed) | [@nuxt/eslint-plugin](https://npmjs.com/@nuxt/eslint-plugin) (`nuxt`) | Since v1.0.0 |
212
+ | ![Nuxt](./assets/devicon-nuxt.svg) `vue/nuxt/config` | ✅ | [@nuxt/eslint-plugin](https://npmjs.com/@nuxt/eslint-plugin) (`nuxt`) | Rules related to Nuxt config file<br>Since v1.0.0 |
207
213
  | ![Pinia](./assets/logos-pinia.svg) `vue/pinia` | ✅ (`pinia` is installed) | [eslint-plugin-pinia](https://npmjs.com/eslint-plugin-pinia) (`pinia`) | - |
208
- | ![Angular] `angular` | ✅ (`@angular/core` is installed) | [@angular-eslint/eslint-plugin](https://npmjs.com/package/@angular-eslint/eslint-plugin) (`@angular-eslint`) | Since v0.78.0 |
209
- | ![Angular] `angular/template` | ✅ | [@angular-eslint/eslint-plugin/template](https://npmjs.com/package/@angular-eslint/eslint-plugin-template) (`@angular-eslint/template`) | - |
214
+ | ![Angular] `angular` | ✅ (`@angular/core` is installed) | [@angular-eslint/eslint-plugin](https://npmjs.com/@angular-eslint/eslint-plugin) (`@angular-eslint`) | Since v0.78.0 |
215
+ | ![Angular] `angular/template` | ✅ | [@angular-eslint/eslint-plugin/template](https://npmjs.com/@angular-eslint/eslint-plugin-template) (`@angular-eslint/template`) | - |
210
216
  | ![ReactJS] `react` | ✅ (`react` is installed) | [eslint-plugin-react](https://npmjs.com/eslint-plugin-react) (`react`) | Since v0.8.0 |
211
217
  | ![ReactJS] `react/reactX` | ✅ | [@eslint-react/eslint-plugin] (`@eslint-react`) | - |
212
218
  | ![ReactJS] `react/hooks` | ✅ | [eslint-plugin-react-hooks](https://npmjs.com/eslint-plugin-react-hooks) (`react-hooks`)<br>[@eslint-react/eslint-plugin] (`@eslint-react`) | Includes rules with `@eslint-react/hooks-extra` prefix from `@eslint-react/eslint-plugin` |
@@ -214,7 +220,7 @@ Sub-config is a Config located within Config's options. If the parent config is
214
220
  | ![ReactJS] `react/refresh` | ✅ | [eslint-plugin-react-refresh](https://npmjs.com/eslint-plugin-react-refresh) (`react-refresh`) | - |
215
221
  | ![ReactJS] `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 |
216
222
  | ![ReactJS] `react/allowDefaultExportsInJsxFiles` | ✅ | - | Config that allows default exports in all JSX files |
217
- | ![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 |
223
+ | ![NextJS](./assets/devicon-nextjs.svg) `nextJs` | ✅ (`next` is installed) | [@next/eslint-plugin-next](https://npmjs.com/@next/eslint-plugin-next) (`@next/next`) | Since v0.9.0 |
218
224
  | ![SolidJS](./assets/devicon-solidjs.svg) `solid` | ✅ (`solid-js` is installed) | [eslint-plugin-solid](https://npmjs.com/eslint-plugin-solid) (`solid`) | Since v0.10.0 |
219
225
  | ![SolidJS](./assets/devicon-qwik.svg) `qwik` | ✅ (`@builder.io/qwik` or `@qwik.dev/core` is installed) | [eslint-plugin-qwik](https://npmjs.com/eslint-plugin-qwik) (`qwik`) | Since v0.6.0 |
220
226
  | ![Astro](./assets/devicon-astro.svg) `astro` | ✅ (`astro` is installed) | [eslint-plugin-astro](https://npmjs.com/eslint-plugin-astro) (`astro`) | Since v0.9.0<br>Without A11Y rules |
@@ -244,25 +250,25 @@ Sub-config is a Config located within Config's options. If the parent config is
244
250
 
245
251
  ### Languages
246
252
 
247
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
248
- | ----------------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
249
- | ![Markdown] `markdown` | ✅ | [@eslint/markdown](https://npmjs.com/package/@eslint/markdown) (`markdown`) | Since v0.7.0<br>Configured to also lint fenced code blocks inside .md files |
250
- | ![Markdown] `markdown/formatFencedCodeBlocks` | ✅ (`prettier` is installed) | [eslint-plugin-prettier](https://npmjs.com/eslint-plugin-prettier) (`prettier`) | Since v1.0.0<br>Format fenced code blocks inside Markdown files using Prettier |
251
- | ![Markdown] `markdownPreferences` | ✅ | [eslint-plugin-markdown-preferences](https://npmjs.com/package/eslint-plugin-markdown-preferences) (`markdownPreferences`) | Since v1.0.0 |
252
- | ![Markdown] `markdownLinks` | ✅ | [eslint-plugin-markdown-links](https://npmjs.com/package/eslint-plugin-markdown-links) (`markdownLinks`) | Since v1.0.0 |
253
- | ![MDX](./assets/vscode-icons-file-type-mdx.svg) `mdx` | ✅ | [eslint-plugin-mdx](https://npmjs.com/eslint-plugin-mdx) (`mdx`) | Since v1.0.0<br>Configured to also lint fenced code blocks inside .mdx files |
254
- | ![CSS] `css` | ✅ (unless `stylelint` is installed) | [@eslint/css](https://npmjs.com/package/@eslint/css) (`css`) | Since v0.7.0 |
255
- | ![CSS] `cssInJs` | ✅ | [eslint-plugin-css](https://npmjs.com/eslint-plugin-css) (`css-in-js`) | Since v0.2.0<br>Lints inlined CSS |
256
- | `jsxA11y` | ✅ | [eslint-plugin-jsx-a11y-x](https://npmjs.com/eslint-plugin-jsx-a11y-x) (`jsx-a11y`) | Since v1.0.0<br>Since v0.8.0 and until v1.0.0, [eslint-plugin-jsx-a11y](https://npmjs.com/eslint-plugin-jsx-a11y) was used |
257
- | ![YAML](./assets/devicon-yaml.svg) `yaml` | ❌ | [eslint-plugin-yaml](https://npmjs.com/eslint-plugin-yaml) (`yaml`) | Since v0.1.0 |
258
- | ![JSON](./assets/devicon-json.svg) `jsonc` | ❌ | [eslint-plugin-jsonc](https://npmjs.com/eslint-plugin-jsonc) (`jsonc`) | Since v0.1.4<br>Supports JSON, JSON5, JSONC |
259
- | `jsonc/json` | ❌ | ^ | Config exclusively for `.json` files, does nothing by default |
260
- | `jsonc/jsonc` | ❌ | ^ | Config exclusively for `.jsonc` files, does nothing by default |
261
- | `jsonc/json5` | ❌ | ^ | Config exclusively for `.json5` files, does nothing by default |
262
- | `jsonSchemaValidator` | ❌ | [eslint-plugin-json-schema-validator](https://npmjs.com/eslint-plugin-json-schema-validator) (`json-schema-validator`) | Since v0.6.0 |
263
- | ![TOML](./assets/tabler-toml.svg) `toml` | ❌ | [eslint-plugin-toml](https://npmjs.com/eslint-plugin-toml) (`toml`) | Since v0.1.3 |
264
- | ![HTML](./assets/devicon-html5.svg) `html` | ✅ | [@html-eslint/eslint-plugin](https://npmjs.com/package/@html-eslint/eslint-plugin) (`@html-eslint`) | Since v0.10.0 |
265
- | ![GraphQL](./assets/logos-graphql.svg) `graphql` | ✅ (`graphql` is installed) | [@graphql-eslint/eslint-plugin](https://npmjs.com/package/@graphql-eslint/eslint-plugin) (`graphql`) | Since v1.0.0 |
253
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
254
+ | ----------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
255
+ | ![Markdown] `markdown` | ✅ | [@eslint/markdown](https://npmjs.com/@eslint/markdown) (`markdown`) | Since v0.7.0<br>Configured to also lint fenced code blocks inside .md files |
256
+ | ![Markdown] `markdown/formatFencedCodeBlocks` | ✅ (`prettier` is installed) | [eslint-plugin-prettier](https://npmjs.com/eslint-plugin-prettier) (`prettier`) | Since v1.0.0<br>Format fenced code blocks inside Markdown files using Prettier |
257
+ | ![Markdown] `markdownPreferences` | ✅ | [eslint-plugin-markdown-preferences](https://npmjs.com/eslint-plugin-markdown-preferences) (`markdownPreferences`) | Since v1.0.0 |
258
+ | ![Markdown] `markdownLinks` | ✅ | [eslint-plugin-markdown-links](https://npmjs.com/eslint-plugin-markdown-links) (`markdownLinks`) | Since v1.0.0 |
259
+ | ![MDX](./assets/vscode-icons-file-type-mdx.svg) `mdx` | ✅ | [eslint-plugin-mdx](https://npmjs.com/eslint-plugin-mdx) (`mdx`) | Since v1.0.0<br>Configured to also lint fenced code blocks inside .mdx files |
260
+ | ![CSS] `css` | ✅ (unless `stylelint` is installed) | [@eslint/css](https://npmjs.com/@eslint/css) (`css`) | Since v0.7.0 |
261
+ | ![CSS] `cssInJs` | ✅ | [eslint-plugin-css](https://npmjs.com/eslint-plugin-css) (`css-in-js`) | Since v0.2.0<br>Lints inlined CSS |
262
+ | `jsxA11y` | ✅ | [eslint-plugin-jsx-a11y-x](https://npmjs.com/eslint-plugin-jsx-a11y-x) (`jsx-a11y`) | Since v1.0.0<br>Since v0.8.0 and until v1.0.0, [eslint-plugin-jsx-a11y](https://npmjs.com/eslint-plugin-jsx-a11y) was used |
263
+ | ![YAML](./assets/devicon-yaml.svg) `yaml` | ❌ | [eslint-plugin-yaml](https://npmjs.com/eslint-plugin-yaml) (`yaml`) | Since v0.1.0 |
264
+ | ![JSON](./assets/devicon-json.svg) `jsonc` | ❌ | [eslint-plugin-jsonc](https://npmjs.com/eslint-plugin-jsonc) (`jsonc`) | Since v0.1.4<br>Supports JSON, JSON5, JSONC |
265
+ | `jsonc/json` | ❌ | ^ | Config exclusively for `.json` files, does nothing by default |
266
+ | `jsonc/jsonc` | ❌ | ^ | Config exclusively for `.jsonc` files, does nothing by default |
267
+ | `jsonc/json5` | ❌ | ^ | Config exclusively for `.json5` files, does nothing by default |
268
+ | `jsonSchemaValidator` | ❌ | [eslint-plugin-json-schema-validator](https://npmjs.com/eslint-plugin-json-schema-validator) (`json-schema-validator`) | Since v0.6.0 |
269
+ | ![TOML](./assets/tabler-toml.svg) `toml` | ❌ | [eslint-plugin-toml](https://npmjs.com/eslint-plugin-toml) (`toml`) | Since v0.1.3 |
270
+ | ![HTML](./assets/devicon-html5.svg) `html` | ✅ | [@html-eslint/eslint-plugin](https://npmjs.com/@html-eslint/eslint-plugin) (`@html-eslint`) | Since v0.10.0 |
271
+ | ![GraphQL](./assets/logos-graphql.svg) `graphql` | ✅ (`graphql` is installed) | [@graphql-eslint/eslint-plugin](https://npmjs.com/@graphql-eslint/eslint-plugin) (`graphql`) | Since v1.0.0 |
266
272
 
267
273
  ### Js/ts - miscellaneous
268
274
 
@@ -283,41 +289,42 @@ Sub-config is a Config located within Config's options. If the parent config is
283
289
 
284
290
  ### Libraries
285
291
 
286
- | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
287
- | ----------------------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
288
- | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
289
- | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
290
- | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
291
- | `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
292
- | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
293
- | `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
294
- | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
295
- | `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
296
- | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
297
- | `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
298
- | ![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 |
299
- | ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
300
- | ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
301
- | ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
302
- | ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
303
- | ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
304
- | ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
305
- | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
306
- | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
307
- | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
308
- | ![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 |
309
- | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
310
- | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
311
- | ![Mocha](./assets/devicon-mocha.svg) `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
312
- | ![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 |
313
- | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
314
- | ![Playwright](./assets/devicon-playwright.svg) `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
315
- | ![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 |
316
- | ![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 |
317
- | ![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 |
318
- | ![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 |
319
- | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
320
- | ![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 |
292
+ | Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
293
+ | ----------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
294
+ | `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
295
+ | `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
296
+ | `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
297
+ | `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
298
+ | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
299
+ | `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
300
+ | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
301
+ | `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
302
+ | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
303
+ | `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
304
+ | ![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 |
305
+ | ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
306
+ | ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
307
+ | ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
308
+ | ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
309
+ | ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
310
+ | ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
311
+ | `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
312
+ | `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
313
+ | ![Storybook](./assets/logos-storybook-icon.svg) `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
314
+ | ![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 |
315
+ | ![Cypress](./assets/vscode-icons-file-type-light-cypress.svg) `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
316
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
317
+ | ![Mocha](./assets/devicon-mocha.svg) `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
318
+ | ![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 |
319
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
320
+ | ![Playwright](./assets/devicon-playwright.svg) `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
321
+ | ![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 |
322
+ | ![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 |
323
+ | ![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 |
324
+ | ![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 |
325
+ | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
326
+ | ![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 |
327
+ | ![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 |
321
328
 
322
329
  ### Miscellaneous
323
330
 
@@ -326,7 +333,7 @@ Sub-config is a Config located within Config's options. If the parent config is
326
333
  | `casePolice` | ❌ | [eslint-plugin-case-police](https://npmjs.com/eslint-plugin-case-police) (`case-police`) | Since v0.9.0 |
327
334
  | `noStylisticRules` | ❌ | - | Since v1.0.0<br>Config to disable most of the stylistic rules. Can be useful when integrating eslint-config-un into an existing project. |
328
335
  | `noUnsanitized` | ✅ | [eslint-plugin-no-unsanitized](https://npmjs.com/eslint-plugin-no-unsanitized) (`no-unsanitized`) | Since v1.0.0 |
329
- | ![CSpell](./assets/vscode-icons-file-type-cspell.svg) `cspell` | ❌ | [@cspell/eslint-plugin](https://npmjs.com/package/@cspell/eslint-plugin) (`@cspell`) | Since v1.0.0 |
336
+ | ![CSpell](./assets/vscode-icons-file-type-cspell.svg) `cspell` | ❌ | [@cspell/eslint-plugin](https://npmjs.com/@cspell/eslint-plugin) (`@cspell`) | Since v1.0.0 |
330
337
  | ![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 |
331
338
  | `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 |
332
339
  | `compat` | ❌ | [eslint-plugin-compat](https://npmjs.com/eslint-plugin-compat) (`compat`) | Since v1.0.0 |
@@ -410,24 +417,24 @@ eslint-config-un provides the ability to change any registered plugin prefix. Ad
410
417
 
411
418
  #### Default renames
412
419
 
413
- | Plugin | Suggested prefix | Our prefix | Reason |
414
- | ------------------------------------------------------------------------ | -------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
415
- | [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
416
- | [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
417
- | [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
418
- | [`eslint-plugin-css`](https://npmjs.com/eslint-plugin-css) | `css` | `css-in-js` | Conflicts with [`@eslint/css`](https://npmjs.com/package/@eslint/css) and our name better captures the essence of the plugin |
419
- | [`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 |
420
- | [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
420
+ | Plugin | Suggested prefix | Our prefix | Reason |
421
+ | ------------------------------------------------------------------------ | -------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------- |
422
+ | [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
423
+ | [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
424
+ | [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
425
+ | [`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 |
426
+ | [`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 |
427
+ | [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
421
428
 
422
429
  > [!NOTE]
423
430
  > 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.
424
431
 
425
- > [!WARNING] Renaming plugins and `eslint-disable` directives
426
- > If you rename a plugin, you will have to manually rename the rules within `eslint-disable-*` directives.
432
+ > [!WARNING]
433
+ > If you rename a plugin, you will have to manually rename the rules within `eslint-disable-*` comments.
427
434
 
428
435
  ### Disabling rule autofix
429
436
 
430
- ESLint [doesn't (yet?) have the ability to disable autofix](https://github.com/eslint/rfcs/pull/125) for a rule by the user on per-rule basis. Our config attempts to provide this missing functionality by giving the ability to disable autofix for a rule as a whole ("globally") or per-file and per-rule basis, but with a caveat that the rule will have `disable-autofix` prefix in its name.
437
+ ESLint [doesn't (yet?) have the ability to disable autofix](https://github.com/eslint/rfcs/pull/125) for a rule by the user on per-rule basis. Our config attempts to provide this missing functionality by giving the ability to disable autofix for a rule as a whole ("globally") or per-file and per-rule basis, but in the latter case with a caveat that the rule will have `disable-autofix/` prefix in its name.
431
438
 
432
439
  #### Globally disabling rule autofix
433
440
 
@@ -497,7 +504,7 @@ We detect the version of the used frontend framework (Angular, Vue, Svelte, etc.
497
504
 
498
505
  #### Vue
499
506
 
500
- By default, TypeScript rules will be enabled in `.vue` files if `enforceTypescriptInScriptSection` is set to true in vue's config options which in turn is *automatically* set to true if `ts` config is enabled. If you have `.vue` files authored in both TypeScript and JavaScript, use `enforceTypescriptInScriptSection.{files,ignores}` to manually specify TS & JS Vue components respectively. It is not currently possible to apply different ESLint rules depending on the value of `lang` attribute of `<script>` SFC section.
507
+ By default, TypeScript rules will be enabled in `.vue` files if `enforceTypescriptInScriptSection` is set to `true` in vue's config options which in turn is *automatically* set to `true` if `ts` config is enabled. If you have `.vue` files authored in both TypeScript and JavaScript, use `enforceTypescriptInScriptSection.{files,ignores}` to manually specify TS & JS Vue components respectively. It is not currently possible to apply different ESLint rules depending on the value of `lang` attribute of `<script>` SFC section.
501
508
 
502
509
  #### Angular
503
510
 
@@ -505,39 +512,80 @@ We support Angular versions from 13 to 20, all at once. You are expected to inst
505
512
 
506
513
  #### React
507
514
 
508
- We use rules from several plugins to lint your React code. You will be able to choose whether you would like to use only `eslint-plugin-react` or `@eslint-react/eslint-plugin`, or both, which is the default.
515
+ We use rules from several plugins to lint your React code. You will be able to choose whether you would like to use only `@eslint-react/eslint-plugin` or `eslint-plugin-react`, or both, which is the default.
509
516
 
510
517
  ### Markdown
511
518
 
512
- If `markdown` config is enabled (which is the default), the same rules provided by other configs will be applied to code blocks (\```lang ... \```) inside Markdown files. This works because under the hood the plugin [`@eslint/markdown`](https://npmjs.com/package/@eslint/markdown) that provides that functionality will create virtual files for each code block with the same extension as specified after ```.
519
+ If `markdown` config is enabled (which is the default), the same rules provided by other configs will be applied to code blocks (\```lang ... \```) inside Markdown files. This works because under the hood the plugin [`@eslint/markdown`](https://npmjs.com/@eslint/markdown) that provides that functionality will create virtual files for each code block with the same extension as specified after ```.
513
520
 
514
521
  But applying certain rules for code blocks might not be desirable because some of them are too strict for the code that won't be executed anyway or even unfixable (like missing imports). You can find the full list of disabled rules in `src/configs/markdown.ts` file.
515
522
 
516
- ## Other root options
523
+ ### Tailwind CSS
524
+
525
+ There exists two plugins working with Tailwind:
526
+
527
+ | Package name | Default plugin prefix | Supported Tailwind versions (declared in `peerDependencies`) |
528
+ | ---------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------ |
529
+ | [`eslint-plugin-better-tailwindcss`](https://npmjs.com/eslint-plugin-better-tailwindcss) | `better-tailwindcss` | `^3.3.0 \|\| ^4.1.6` |
530
+ | [`eslint-plugin-tailwindcss`](https://npmjs.com/eslint-plugin-tailwindcss) | `tailwindcss` | `^3.4.0` |
531
+
532
+ We highly recommend using the former because it supports Tailwind v4 and as of time of writing it is better maintained and more actively updated.
533
+ In addition, if you don't like the verbosity of the default prefix, you can use [`pluginRenames` option](#pluginrenames) to rename it to simply `tailwindcss` or `tailwind`.
534
+
535
+ ## Root options
536
+
537
+ ### `configs`
538
+
539
+ ### `extraConfigs`
540
+
541
+ See [Rules configuration](#rules-configuration-configs-and-extraconfigs-option).
517
542
 
518
543
  ### `ignores`
519
544
 
520
- Specifies a list of globally ignored files. By default will be merged with our ignore patterns, unless `overrideIgnores` is set to `true`.
545
+ Specifies a list of globally ignored files. By default will be merged with our ignore patterns (also exported as [`DEFAULT_GLOBAL_IGNORES`](#default_global_ignores)), unless the object notation is used and the `override` property is set to `true`.
521
546
 
522
- ### `overrideIgnores`
547
+ ### `extraPlugins`
523
548
 
524
- Set to `true` if you don't want `ignores` to be merged with our ignore patterns, which are `['**/dist']`.
549
+ Allows to provide additional ESLint plugins. Their prefixes and possibly rule names will appear in configs' `rules` property type. They, like all the built-in plugins, by default will be loaded only if used.
525
550
 
526
- ### `gitignore`
551
+ Note that their prefixes must not match the built-it/known ones (like `ts` or `unicorn`) or even prefixes you've set via [`pluginRenames`](#pluginrenames).
552
+
553
+ ### `defaultConfigsStatus`
554
+
555
+ Quickly enable multiple configs at once. Possible options:
527
556
 
528
- By default `.gitignore`d files will be added to `ignores` list. Set to `false` to disable this behavior. You may also provide an object which configures [eslint-config-flat-gitignore](https://npmjs.com/eslint-config-flat-gitignore), which provides this functionality in the first place.
557
+ - `all-disabled`: consider all top level configs disabled unless explicitly enabled.
558
+ - `misc-enabled`: consider some configs disabled by default (see the list in JSDoc).
529
559
 
530
560
  ### `mode`
531
561
 
532
562
  Type of your project, either application (`app`, default) or library (`lib`). Will affect certain rules, actual list of which is written in JSDoc of this option.
533
563
 
534
- ### `disablePrettierIncompatibleRules`
564
+ ### `forceSeverity`
535
565
 
536
- Disables rules that are potentially conflicting with Prettier. [`eslint-config-prettier`](https://npmjs.com/eslint-config-prettier) is used under the hood, with a few exceptions. Defaults to `true` if `prettier` package is installed.
566
+ Globally forces non-zero severity of all the rules configured by eslint-config-un (i.e. not within `overrides`, `overridesAny` or [`extraConfigs`](#extraconfigs)). This can also be configured per-config.
537
567
 
538
- ### `forceSeverity`
568
+ ### `pluginRenames`
569
+
570
+ See [Plugin prefixes](#plugin-prefixes-pluginrenames-option).
571
+
572
+ ### `pluginOverrides`
573
+
574
+ Override implementation of some of the plugins. This can be useful when this config is used to lint a repository of one of the built-in plugins to provide development version of that plugin.
575
+
576
+ ### `loadPluginsOnDemand`
577
+
578
+ This option allows to decide whether whether ESLint plugins will be loaded if they are actually used (`true` by default).
579
+
580
+ Using object notation, you can also specify concrete plugins that will be loaded. This can be useful if you enable certain plugin rules only be using [configuration comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments).
539
581
 
540
- Globally forces non-zero severity of all the rules configured by eslint-config-un (i.e. not within `overrides`, `overridesAny` or `extraConfigs`). This can also be configured per-config.
582
+ ### `autofixDisabledGloballyFor`
583
+
584
+ See [Globally disabling rule autofix](#globally-disabling-rule-autofix).
585
+
586
+ ### `gitignore`
587
+
588
+ By default files from `.gitignore` (read from [the current working directory](https://nodejs.org/api/process.html#processcwd)) in the will be automatically added to the global [`ignores`](#ignores) list. Set this option to `false` to disable this behavior. You may also provide an object which configures [eslint-config-flat-gitignore](https://npmjs.com/eslint-config-flat-gitignore), which actually provides this functionality.
541
589
 
542
590
  ### `offlineMode`
543
591
 
@@ -545,28 +593,75 @@ Enables "Offline mode" which can be useful to (temporarily) disable rules perfor
545
593
 
546
594
  It can also be enabled by setting `ESLINT_CONFIG_UN_OFFLINE_MODE` environment variable to non-empty string, but the explicitly passed value takes precedence.
547
595
 
548
- ### `useFastImport`
549
-
550
- Allows to override certain [`eslint-plugin-import-x`] plugin rules with implementations from [`eslint-plugin-fast-import`](https://npmjs.com/eslint-plugin-fast-import).
551
-
552
596
  ### `cacheConfigs`
553
597
 
554
598
  Enables flat config caching. This option is enabled by default when running in editor (detected by [`is-in-editor`](https://npmjs.com/is-in-editor)). It can also be enabled by setting `ESLINT_CONFIG_UN_CACHE_CONFIGS` environment variable to non-empty string, but the explicitly passed value takes precedence.
555
599
 
556
- Note that caching might fail if the config contains unserializable data, such as functions.
600
+ There are 2 layers of caching:
557
601
 
558
- Cache will be stored in `node_modules/.cache/eslint-config-un/config.json` and considered fresh for 1 hour, unless one of the following is changed:
602
+ - In memory: the cache will be stored in a global variable, and if it's preserved between ESLint extension process re-runs (it does at least in VSCode), it will be preferred over FS cache. This is an **extremely fast** caching option.
603
+ - In file system: the cache will be stored in `node_modules/.cache/eslint-config-un/config.json`. Note that in this case caching might fail if the config contains unserializable data, such as functions.
604
+
605
+ The cache, regardless of the storage, is considered fresh for 1 hour, unless one of the following is changed:
559
606
 
560
607
  - Current git revision (`git rev-parse HEAD`) or root `.gitignore` contents
561
608
  - `package.json`, lockfile contents or package manager
562
609
  - ESLint config file contents
563
610
  - Node.JS version
564
611
 
565
- ### `extraPlugins`
612
+ ### `disablePrettierIncompatibleRules`
613
+
614
+ Disables rules that are potentially conflicting with Prettier. [`eslint-config-prettier`](https://npmjs.com/eslint-config-prettier) is used under the hood, with a few exceptions. Defaults to `true` if `prettier` package is installed.
615
+
616
+ ### `useFastImport`
617
+
618
+ Allows to override certain [`eslint-plugin-import-x`] plugin rules with implementations from [`eslint-plugin-fast-import`](https://npmjs.com/eslint-plugin-fast-import).
619
+
620
+ ## Other exports
621
+
622
+ ### Main entrypoint
623
+
624
+ #### `globals`
625
+
626
+ Re-exported default export from [`globals` package](https://npmjs.com/globals), which is a direct dependency of eslint-config-un.
627
+
628
+ #### `isInCi`
629
+
630
+ The constant showing if the current process is *likely* running in CI. Info provided by [`ci-info` package](https://npmjs.com/ci-info).
631
+
632
+ Use case: disable or enable certain rules or features in CI. Use with caution!
633
+
634
+ #### `isInEditor`
635
+
636
+ The constant showing if the current process is *likely* running within editor. Info provided by [`is-in-editor` package](https://npmjs.com/is-in-editor).
637
+
638
+ Use case: disable or enable certain rules or features in editor, likely to improve performance.
639
+
640
+ > [!WARNING]
641
+ > Use this option sparingly as disabling certain rules only in editor might cause false positive reports on unused directives, which are subject to removal with autofix. We recommend also setting [`linterOptions.reportUnusedDisableDirectives`](https://eslint.org/docs/latest/use/configure/configuration-files#:~:text=reportUnusedDisableDirectives) to `!isInEditor()` for files affected by this option.
642
+
643
+ #### `DEFAULT_GLOBAL_IGNORES`
644
+
645
+ Default list of global `ignores` values set by eslint-config-un. See also [`ignores` option](#ignores)
566
646
 
567
- Allows to provide additional ESLint plugins. Their prefixes and possibly rule names will appear in configs' `rules` property type. They will be lazy-loaded only if used.
647
+ #### `RuleOptions`
568
648
 
569
- Note that their prefixes must not match the built-it/known ones (like `ts` or `unicorn`) or even prefixes you've renamed via `pluginRenames`.
649
+ All built-in plugins' options type generated by [`eslint-typegen` package](https://npmjs.com/eslint-typegen).
650
+
651
+ ### `snippets` entrypoint
652
+
653
+ #### Rule options generators
654
+
655
+ Some useful rule options snippet generators are provided which can be aggravating to write manually:
656
+
657
+ - `forbidImportingFromUtilityLibraries` for [`no-restricted-imports`](https://eslint.org/docs/latest/rules/no-restricted-imports)
658
+ - `forbid$slotsInsideVueTemplates` for [`vue/no-restricted-syntax`](https://eslint.vuejs.org/rules/no-restricted-syntax.html)
659
+
660
+ Please refer to JSDoc of exported symbols for proper documentation.
661
+
662
+ #### `createNoRestricted*Rule`
663
+
664
+ Utility functions re-exported from [`eslint-no-restricted` package](https://npmjs.com/eslint-no-restricted) which generate `no-restricted-*` rules. Please refer to [the package documentation](https://github.com/bradzacher/eslint-no-restricted#readme) for more info.
570
665
 
571
666
  ## FAQ
572
667
 
@@ -578,7 +673,7 @@ Alternatively, you can `await` the `eslintConfig()` function and then add your o
578
673
 
579
674
  ### Do I have to install any of the used plugins?
580
675
 
581
- No! 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. If anything, you can always override the dependency version using your package manager settings. Although, this might not be safe because we generate types for specific versions of the plugins, so the actual options of the rules might be different.
676
+ Many plugins are direct dependencies on this package, but the rest (the majority) are optional peer dependencies which means you're responsible for making sure they're installed. eslint-config-un will refuse to work if a plugin is used but not installed. Please run ESLint with our config once to get the list of dependencies to be installed manually.
582
677
 
583
678
  ### How do I know how eslint-config-un configures rules?
584
679
 
@@ -586,16 +681,52 @@ It's too much to document, so please have a look at the source code of our confi
586
681
 
587
682
  ### How does exactly eslint-config-un knows if some package is installed?
588
683
 
589
- We use [`local-pkg`](https://npmjs.com/local-pkg) package to detect if a package is installed.
684
+ 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`.
590
685
 
591
686
  ### How can I know which configs will be enabled, for which rules autofix will be disabled, etc.?
592
687
 
593
- You can enable the debug mode by setting `DEBUG=eslint-config-un` environment variable when running ESLint command.
688
+ You can enable the debug mode by setting `DEBUG=eslint-config-un` environment variable when running ESLint command. We use [`obug` package](https://npmjs.com/obug) ([`debug`](https://npmjs.com/debug) alternative with compatible API) to print debug messages, so please refer to its documentation for more info.
689
+
690
+ Alternatively, you can use [`@eslint/config-inspector`](https://npmjs.com/@eslint/config-inspector) to inspect the final config.
691
+
692
+ ## Migrating existing codebase to eslint-config-un
693
+
694
+ ### Prerequisites
594
695
 
595
- Alternatively, you can use [`@eslint/config-inspector`](https://npmjs.com/package/@eslint/config-inspector) to inspect the final config.
696
+ Node.JS and ESLint satisfy [minimum required versions](#installation). Please don't attempt to migrate to ESLint 9 and eslint-config-un at the same time.
697
+
698
+ ### Migration guide
699
+
700
+ <!-- eslint-disable-next-line markdown-preferences/ordered-list-marker-start -->
701
+ 0. Remove **ALL** ESLint related dependencies - be it plugins, parsers, whatever else or `eslint` itself. This ensures correct versions of plugins will be resolved by eslint-config-un and saves you from other weird and hard to debug problems. We recommend that every and sub-step below is done in a separate commit and in a separate git branch.
702
+ 1. If you're using `.js` config file, we highly recommend that you migrate to `.ts` one, or at least add `@ts-check` TypeScript directive. Please don't forget install [`jiti`](https://npmjs.com/jiti) for ESLint to able be to read your TypeScript config file.
703
+ 2. Set up eslint-config-un minimally and run ESLint for the first time (you may comment out the old config for now). The list of dependencies to be installed will *likely* be shown. Please review whether those plugins are actually used/needed and act accordingly: install necessary plugins and disable configs which require packages you do not wish to install.
704
+ 3. Following your intuition or/and configs' options JSDoc documentation, migrate the existing config to the closest eslint-config-un equivalent. Likely plenty of other rules will be enabled.
705
+ 4. Set `configs.noStylisticRules` to `true` to disable purely stylistic rules and run ESLint for the first time with the new config. Please don't use `--fix` option - this may complicate things as you will have less idea of what's changed (plus some autofixes may be unsafe to automatically apply). Thoroughly go through the report and:
706
+ - Decide which rules need to be disabled, enabled or changed the options of;
707
+ - Decide which `eslint-ignore` comments are no longer relevant and should be removed;
708
+ - Possibly set `ts.allowDefaultProject` to include files which are not part of any TypeScript project (tsconfig file), but for which TypeScript type-aware rules (rules requiring type information) should still work. Conversely, if for some files type-aware linting should be disabled, specify them in `ts.configTypeAware.ignores` option (or set `ts.configTypeAware` to `false` to disable type-aware linting altogether);
709
+ - Add `<!-- eslint-skip -->` comments before fenced code blocks in Markdown files for which code parsing is failing;
710
+ - Fix/resolve any other issues and difficulties.
711
+ 5. Now, enable stylistic rules only and fix them by running ESLint with `--fix --fix-type problem,suggestion,layout` (the latter flag ensures auto removal of "unused" `eslint-disable` comments is off):
712
+
713
+ ```ts
714
+ noStylisticRules: {
715
+ enableRules: {
716
+ rules: true,
717
+ disableAllOtherRules: true,
718
+ },
719
+ }
720
+ ```
721
+
722
+ 6. Remove `noStylisticRules` config and probably re-run ESLint as you would do normally to make sure everything is working as intended.
596
723
 
597
724
  ## Troubleshooting & caveats
598
725
 
726
+ ### Why are there reports from `node` plugin in my frontend code?
727
+
728
+ All code is assumed to be Node.JS code by default (`eslint-plugin-n` plugin is run on such code). Please specify `files`, `ignores` or disable `node` config altogether to avoid false positives.
729
+
599
730
  <!-- eslint-disable-next-line markdown-preferences/heading-casing -->
600
731
  ### TypeError: Key `languageOptions`: Key `globals`: Global `AudioWorkletGlobalScope ` has leading or trailing whitespace.
601
732
 
@@ -605,14 +736,12 @@ Install `globals` package as a dev dependency.
605
736
 
606
737
  If you would like not to wait until the dependencies of `eslint-config-un` are updated or by whatever other reason you need to install a different version of a dependency, you can do that using your package manager's settings for all but the following packages:
607
738
 
608
- | Package name | Reason |
609
- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
610
- | [`eslint-plugin-prettier`](https://npmjs.com/eslint-plugin-prettier) | Patched by us to enable formatting of "fenced code blocks" inside Markdown files |
611
- | [`eslint-plugin-no-type-assertion`](https://npmjs.com/eslint-plugin-no-type-assertion) | Has outdated requirements of peer dependencies |
612
- | [`@angular-eslint/eslint-plugin-template@17.5.3`](https://npmjs.com/package/@angular-eslint/eslint-plugin-template/v/17.5.3) | Old version with outdated requirements of peer dependencies |
613
- | [`@angular-eslint/eslint-plugin@18.4.3`](https://npmjs.com/package/@angular-eslint/eslint-plugin-template/v/18.4.3) | ^ |
739
+ | Package name | Reason |
740
+ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
741
+ | [`eslint-plugin-no-type-assertion`](https://npmjs.com/eslint-plugin-no-type-assertion) | Has outdated requirements of peer dependencies |
742
+ | [`eslint-plugin-prettier`](https://npmjs.com/eslint-plugin-prettier) | Patched by us to enable formatting of "fenced code blocks" inside Markdown files |
614
743
 
615
- [@eslint-react/eslint-plugin]: https://npmjs.com/package/@eslint-react/eslint-plugin
744
+ [@eslint-react/eslint-plugin]: https://npmjs.com/@eslint-react/eslint-plugin
616
745
  [Angular]: ./assets/devicon-angular.svg
617
746
  [CSS]: ./assets/devicon-css3.svg
618
747
  [Ember]: ./assets/devicon-ember.svg