eslint-config-un 1.0.0-beta.0 → 1.0.0-beta.1

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 (106) hide show
  1. package/README.md +142 -58
  2. package/dist/angular.mjs +2 -2
  3. package/dist/antfu.mjs +20 -0
  4. package/dist/astro.mjs +2 -2
  5. package/dist/ava.mjs +2 -2
  6. package/dist/better-tailwind.mjs +2 -2
  7. package/dist/boundaries.mjs +18 -0
  8. package/dist/case-police.mjs +1 -1
  9. package/dist/check-file.mjs +2 -2
  10. package/dist/cli.mjs +2 -2
  11. package/dist/cloudfront-functions.mjs +3 -3
  12. package/dist/command.mjs +17 -0
  13. package/dist/compat.mjs +1 -1
  14. package/dist/constants.mjs +35 -22
  15. package/dist/cspell.mjs +1 -1
  16. package/dist/css-in-js.mjs +1 -1
  17. package/dist/css.mjs +2 -2
  18. package/dist/cypress.mjs +2 -2
  19. package/dist/de-morgan.mjs +1 -1
  20. package/dist/depend.mjs +2 -2
  21. package/dist/docusaurus.mjs +20 -0
  22. package/dist/ember.mjs +2 -2
  23. package/dist/erasable-syntax-only.mjs +2 -2
  24. package/dist/es.mjs +48 -3
  25. package/dist/eslint-comments.mjs +2 -2
  26. package/dist/eslint-plugin.mjs +2 -2
  27. package/dist/eslint.d.mts +5055 -3699
  28. package/dist/eslint.mjs +8 -8
  29. package/dist/expect-type.mjs +21 -0
  30. package/dist/fast-import.mjs +2 -2
  31. package/dist/file-progress.mjs +1 -1
  32. package/dist/formatjs.mjs +2 -2
  33. package/dist/graphql.mjs +2 -2
  34. package/dist/header.mjs +1 -1
  35. package/dist/headers.mjs +1 -1
  36. package/dist/html.mjs +2 -2
  37. package/dist/import-zod.mjs +1 -1
  38. package/dist/import.mjs +3 -5
  39. package/dist/index.mjs +24 -5
  40. package/dist/jest-dom.mjs +22 -0
  41. package/dist/jest.mjs +2 -2
  42. package/dist/js-inline.mjs +1 -1
  43. package/dist/js.mjs +2 -2
  44. package/dist/jsdoc.mjs +2 -2
  45. package/dist/json-schema-validator.mjs +1 -1
  46. package/dist/jsonc.mjs +2 -2
  47. package/dist/jsx-a11y.mjs +2 -2
  48. package/dist/lit.mjs +2 -2
  49. package/dist/loaders.mjs +13 -2
  50. package/dist/markdown-links.mjs +2 -2
  51. package/dist/markdown-preferences.mjs +7 -4
  52. package/dist/markdown.mjs +19 -7
  53. package/dist/math.mjs +2 -2
  54. package/dist/mdx.mjs +2 -2
  55. package/dist/mocha.mjs +2 -2
  56. package/dist/module-interop.mjs +17 -0
  57. package/dist/nest-js.mjs +20 -0
  58. package/dist/nextjs.mjs +2 -2
  59. package/dist/no-only-tests.mjs +2 -2
  60. package/dist/no-secrets.mjs +34 -0
  61. package/dist/no-stylistic-rules.mjs +206 -100
  62. package/dist/no-unsanitized.mjs +1 -1
  63. package/dist/node-dependencies.mjs +2 -2
  64. package/dist/node.mjs +2 -2
  65. package/dist/nx.mjs +2 -2
  66. package/dist/package-json.mjs +2 -2
  67. package/dist/perfectionist.mjs +2 -2
  68. package/dist/playwright.mjs +2 -2
  69. package/dist/pnpm.mjs +9 -6
  70. package/dist/prefer-arrow-functions.mjs +2 -2
  71. package/dist/promise.mjs +2 -2
  72. package/dist/qunit.mjs +2 -2
  73. package/dist/qwik.mjs +2 -2
  74. package/dist/react.mjs +2 -2
  75. package/dist/regexp.mjs +2 -2
  76. package/dist/rxjs.mjs +2 -2
  77. package/dist/security.mjs +2 -2
  78. package/dist/shared.mjs +2 -2
  79. package/dist/snippets.d.mts +5 -2
  80. package/dist/snippets.mjs +4 -3
  81. package/dist/solid.mjs +2 -2
  82. package/dist/sonar.mjs +2 -2
  83. package/dist/storybook.mjs +2 -2
  84. package/dist/stylistic.mjs +2 -2
  85. package/dist/svelte.mjs +2 -2
  86. package/dist/tailwind.mjs +2 -2
  87. package/dist/tanstack-query.mjs +1 -1
  88. package/dist/testing-library.mjs +2 -2
  89. package/dist/toml.mjs +2 -2
  90. package/dist/tree-shaking.mjs +21 -0
  91. package/dist/ts.mjs +3 -3
  92. package/dist/turbo.mjs +1 -1
  93. package/dist/un.mjs +2 -2
  94. package/dist/unicorn.mjs +2 -2
  95. package/dist/unnecessary-abstractions.mjs +1 -1
  96. package/dist/unocss.mjs +2 -2
  97. package/dist/unused-imports.mjs +1 -1
  98. package/dist/utils.mjs +2 -1
  99. package/dist/vitest.mjs +11 -4
  100. package/dist/vue.mjs +3 -3
  101. package/dist/web-components.mjs +2 -2
  102. package/dist/yaml.mjs +2 -2
  103. package/dist/you-dont-need-lodash-underscore.mjs +2 -2
  104. package/dist/zod.mjs +13 -4
  105. package/package.json +114 -67
  106. package/dist/es2.mjs +0 -50
package/README.md CHANGED
@@ -42,14 +42,19 @@ pnpm i -D eslint-config-un eslint@latest
42
42
  yarn add -D eslint-config-un eslint@latest # Yarn Berry only (v2+)
43
43
  ```
44
44
 
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
+ Commonly used plugins are direct dependencies of this package, you don't need to install them separately.
46
+ We aim to update the dependencies within 1 month after their release.
47
+ You can always override plugins' implementation with [`pluginOverrides` option](#pluginoverrides) or using your package manager's overrides functionality.
46
48
 
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.
49
+ 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.
50
+ You need to run ESLint with our config once to find out which plugins should be installed manually.
48
51
 
49
52
  <details>
50
53
  <summary>Installation with Yarn Classic (v1)</summary>
51
54
 
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:
55
+ 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.
56
+ It fails with "Tarball is not in network and can not be located in cache" error.
57
+ Installing directly from the tarball does work:
53
58
 
54
59
  ```sh
55
60
  yarn add -D https://registry.npmjs.org/eslint-config-un/-/eslint-config-un-<VERSION>.tgz eslint@latest
@@ -67,6 +72,8 @@ Note that if you're using custom registry, the URL should be changed accordingly
67
72
  | `@angular-eslint/eslint-plugin-template` | `@angular-eslint/template` |
68
73
  | `@angular-eslint/eslint-plugin` | `@angular-eslint` |
69
74
  | `@cspell/eslint-plugin` | `@cspell` |
75
+ | `@darraghor/eslint-plugin-nestjs-typed` | `nestjs` |
76
+ | `@docusaurus/eslint-plugin` | `docusaurus` |
70
77
  | `@eslint-react/eslint-plugin` | `@eslint-react` |
71
78
  | `@intlify/eslint-plugin-vue-i18n` | `@intlify/vue-i18n` |
72
79
  | `@next/eslint-plugin-next` | `@next/next` |
@@ -74,13 +81,16 @@ Note that if you're using custom registry, the URL should be changed accordingly
74
81
  | `eslint-plugin-astro` | `astro` |
75
82
  | `eslint-plugin-ava` | `ava` |
76
83
  | `eslint-plugin-better-tailwindcss` | `better-tailwindcss` |
84
+ | `eslint-plugin-boundaries` | `boundaries` |
77
85
  | `eslint-plugin-case-police` | `case-police` |
78
86
  | `eslint-plugin-check-file` | `check-file` |
87
+ | `eslint-plugin-command` | `command` |
79
88
  | `eslint-plugin-de-morgan` | `de-morgan` |
80
89
  | `eslint-plugin-ember` | `ember` |
81
90
  | `eslint-plugin-erasable-syntax-only` | `erasable-syntax-only` |
82
91
  | `eslint-plugin-es-x` | `es` |
83
92
  | `eslint-plugin-eslint-plugin` | `eslint-plugin` |
93
+ | `eslint-plugin-expect-type` | `expect-type` |
84
94
  | `eslint-plugin-fast-import` | `fast-import` |
85
95
  | `@graphql-eslint/eslint-plugin` | `graphql` |
86
96
  | `eslint-plugin-header` | `header` |
@@ -130,9 +140,13 @@ export default eslintConfig({
130
140
 
131
141
  ## List of configs
132
142
 
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.
143
+ eslint-config-un has a concept of Configs and Sub-configs, further referred to as Configs.
144
+ They are similar to ESLint flat config objects, but with some useful extensions.
145
+ Every Config is *usually* tied to a one or more ESLint plugins produces one or more ESLint flat config items.
134
146
 
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.
147
+ You can enable any Config by setting it to `true` or an object with the Config's options.
148
+ Passing `false` disables the Config.
149
+ Passing an empty array to `files` disables the Config, but not its' Sub-configs.
136
150
 
137
151
  <details>
138
152
  <summary>Config interface & docs</summary>
@@ -171,7 +185,8 @@ type Severity = 0 | 1 | 2 | 'off' | 'warn' | 'error';
171
185
 
172
186
  <br>
173
187
 
174
- - Sub-configs are the same as Configs, but configured within Config options. All Sub-configs use `configXXX` naming convention.
188
+ - Sub-configs are the same as Configs, but configured within Config options.
189
+ All Sub-configs use `configXXX` naming convention.
175
190
  - 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`.
176
191
  - `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
192
  - If you specify an empty array for `files`, the Config **will be disabled**, but of its' Sub-configs remain unaffected.
@@ -182,7 +197,9 @@ type Severity = 0 | 1 | 2 | 'off' | 'warn' | 'error';
182
197
  - `forceSeverity` allows to bulk override the severity of all the rules not overridden via `overrides` or `overridesAny`.
183
198
  - Custom options are individual for each Config and are documented in JSDoc format.
184
199
 
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.
200
+ Sub-config is a Config located within Config's options.
201
+ If the parent config is disabled by passing `false`, all its' Sub-configs are disabled too.
202
+ In the following table, Sub-configs have `/` in their names.
186
203
 
187
204
  ### Most popular and well known
188
205
 
@@ -233,6 +250,7 @@ Sub-config is a Config located within Config's options. If the parent config is
233
250
  | ![Lit](./assets/logos-lit-icon.svg) `lit/a11y` | ✅ | [eslint-plugin-lit-a11y](https://npmjs.com/eslint-plugin-lit-a11y) (`lit-a11y`) | Since v1.0.0 |
234
251
  | ![TailwindCSS] `betterTailwind` | ✅ (`tailwindcss` is installed) | [eslint-plugin-better-tailwindcss](https://npmjs.com/eslint-plugin-better-tailwindcss) (`better-tailwindcss`) | Since v1.0.0<br>Supports v4 and v3 |
235
252
  | ![TailwindCSS] `tailwind` | ❌ | [eslint-plugin-tailwindcss](https://npmjs.com/eslint-plugin-tailwindcss) (`tailwindcss`) | Only supports v3 |
253
+ | ![NestJS](./assets/devicon-nestjs.svg) `nestJs` | ✅ (`@nestjs/core` is installed) | [@darraghor/eslint-plugin-nestjs-typed](https://npmjs.com/@darraghor/eslint-plugin-nestjs-typed) (`nestjs`) | Since v1.0.0 |
236
254
 
237
255
  ### Runtimes & related
238
256
 
@@ -254,6 +272,7 @@ Sub-config is a Config located within Config's options. If the parent config is
254
272
  | ----------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
255
273
  | ![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
274
  | ![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 |
275
+ | ![Markdown] `markdown/sentencesPerLine` | ❌ | [eslint-plugin-sentences-per-line](https://npmjs.com/eslint-plugin-sentences-per-line) (`sentences-per-line`) | Since v1.0.0 |
257
276
  | ![Markdown] `markdownPreferences` | ✅ | [eslint-plugin-markdown-preferences](https://npmjs.com/eslint-plugin-markdown-preferences) (`markdownPreferences`) | Since v1.0.0 |
258
277
  | ![Markdown] `markdownLinks` | ✅ | [eslint-plugin-markdown-links](https://npmjs.com/eslint-plugin-markdown-links) (`markdownLinks`) | Since v1.0.0 |
259
278
  | ![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 |
@@ -286,6 +305,8 @@ Sub-config is a Config located within Config's options. If the parent config is
286
305
  | `erasableSyntaxOnly` | ❌ | [eslint-plugin-erasable-syntax-only](https://npmjs.com/eslint-plugin-erasable-syntax-only) (`erasable-syntax-only`) | Since v1.0.0 |
287
306
  | `noUnnecessaryAbstractions` | ✅ | [eslint-plugin-unnecessary-abstractions](https://npmjs.com/eslint-plugin-unnecessary-abstractions) (`unnecessary-abstractions`) | Since v1.0.0 |
288
307
  | `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 |
308
+ | `moduleInterop` | ✅ | [eslint-plugin-module-interop](https://npmjs.com/eslint-plugin-module-interop) (`module-interop`) | Since v1.0.0 |
309
+ | `treeShaking` | ❌ | [eslint-plugin-tree-shaking](https://npmjs.com/eslint-plugin-tree-shaking) (`tree-shaking`) | Since v1.0.0 |
289
310
 
290
311
  ### Libraries
291
312
 
@@ -297,6 +318,7 @@ Sub-config is a Config located within Config's options. If the parent config is
297
318
  | `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
298
319
  | `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
299
320
  | `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
321
+ | `jestDom` | ✅ (`@testing-library/jest-dom` is installed) | [eslint-plugin-jest-dom](https://npmjs.com/eslint-plugin-jest-dom) (`jest-dom`) | Since v1.0.0 |
300
322
  | `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
301
323
  | `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
302
324
  | `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
@@ -325,6 +347,7 @@ Sub-config is a Config located within Config's options. If the parent config is
325
347
  | ![UnoCSS](./assets/logos-unocss.svg) `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
326
348
  | ![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
349
  | ![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 |
350
+ | ![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 |
328
351
 
329
352
  ### Miscellaneous
330
353
 
@@ -341,6 +364,12 @@ Sub-config is a Config located within Config's options. If the parent config is
341
364
  | `header` | ❌ | [eslint-plugin-header](https://npmjs.com/eslint-plugin-header) (`header`) | Since v1.0.0 |
342
365
  | `headers` | ❌ | [eslint-plugin-headers](https://npmjs.com/eslint-plugin-headers) (`headers`) | Since v1.0.0 |
343
366
  | `checkFile` | ❌ | [eslint-plugin-check-file](https://npmjs.com/eslint-plugin-check-file) (`check-file`) | Since v1.0.0 |
367
+ | `boundaries` | ❌ | [eslint-plugin-boundaries](https://npmjs.com/eslint-plugin-boundaries) (`boundaries`) | Since v1.0.0 |
368
+ | `noSecrets` | ✅ | [eslint-plugin-no-secrets](https://npmjs.com/eslint-plugin-no-secrets) (`no-secrets`) | Since v1.0.0 |
369
+ | `noSecrets/json` | ✅ | ^ | Applied only to `.json` files by default |
370
+ | `expectType` | ❌ | [eslint-plugin-expect-type](https://npmjs.com/eslint-plugin-expect-type) (`expect-type`) | Since v1.0.0 |
371
+ | `command` | ❌ | [eslint-plugin-command](https://npmjs.com/eslint-plugin-command) (`command`) | Since v1.0.0 |
372
+ | `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. |
344
373
 
345
374
  ## How to use
346
375
 
@@ -383,7 +412,8 @@ export default eslintConfig({
383
412
 
384
413
  #### Providing user defined flag configs
385
414
 
386
- You can provide your own configs by using `extraConfigs` option. The provided configs will be placed after all the eslint-config-un's configs, and before the config which disables Prettier incompatible rules for all files.
415
+ You can provide your own configs by using `extraConfigs` option.
416
+ The provided configs will be placed after all the eslint-config-un's configs, and before the config which disables Prettier incompatible rules for all files.
387
417
 
388
418
  Example:
389
419
 
@@ -411,20 +441,25 @@ export default eslintConfig({
411
441
 
412
442
  ### Plugin prefixes (`pluginRenames` option)
413
443
 
414
- ESLint plugins are registered with an arbitrary user-provided prefix, such as `unicorn` or `vue`. Then the rule name are formed by combining the prefix with the rule name, for example `unicorn/no-useless-undefined`.
444
+ ESLint plugins are registered with an arbitrary user-provided prefix, such as `unicorn` or `vue`.
445
+ Then the rule name are formed by combining the prefix with the rule name, for example `unicorn/no-useless-undefined`.
415
446
 
416
- eslint-config-un provides the ability to change any registered plugin prefix. Additionally, some plugins are registered with a different prefix than their documentation suggests. If you would like to rename them back or rename some other plugins, you can use `pluginRenames` option, which is a map from the "canonical" prefixes to the user defined ones.
447
+ eslint-config-un provides the ability to change any registered plugin prefix.
448
+ Additionally, some plugins are registered with a different prefix than their documentation suggests.
449
+ If you would like to rename them back or rename some other plugins, you can use `pluginRenames` option, which is a map from the "canonical" prefixes to the user defined ones.
417
450
 
418
451
  #### Default renames
419
452
 
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 |
453
+ | Plugin | Suggested prefix | Our prefix | Reason |
454
+ | -------------------------------------------------------------------------------------------------- | ------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
455
+ | [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
456
+ | [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
457
+ | [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
458
+ | [`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 |
459
+ | [`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 |
460
+ | [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
461
+ | [`@docusaurus/eslint-plugin`](https://npmjs.com/@docusaurus/eslint-plugin) | `@docusaurus` | `docusaurus` | `@` feels unnecessary |
462
+ | [`@darraghor/eslint-plugin-nestjs-typed`](https://npmjs.com/@darraghor/eslint-plugin-nestjs-typed) | `@darraghor/nestjs-typed` | `nestjs` | More concise and convenient to use |
428
463
 
429
464
  > [!NOTE]
430
465
  > 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.
@@ -434,7 +469,8 @@ eslint-config-un provides the ability to change any registered plugin prefix. Ad
434
469
 
435
470
  ### Disabling rule autofix
436
471
 
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.
472
+ 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.
473
+ 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.
438
474
 
439
475
  #### Globally disabling rule autofix
440
476
 
@@ -490,35 +526,47 @@ export default eslintConfig({
490
526
  });
491
527
  ```
492
528
 
493
- This will technically create a plugin with `disable-autofix` prefix and copy this rule into it. The final rule is going to be given a name `disable-autofix/<rule-name>` which would replace `<rule-name>` entry in the resulting config.
529
+ This will technically create a plugin with `disable-autofix` prefix and copy this rule into it.
530
+ The final rule is going to be given a name `disable-autofix/<rule-name>` which would replace `<rule-name>` entry in the resulting config.
494
531
 
495
532
  ## Configs notes
496
533
 
497
534
  ### TypeScript
498
535
 
499
- Rules [requiring type information](https://typescript-eslint.io/rules/?=typeInformation), which are [known to be performance-demanding](https://typescript-eslint.io/getting-started/typed-linting/#performance), are *enabled* by default, and will be applied to the same files as `ts` config is applied to. It's just a little heads up; you should make your own decision whether to keep them enabled. Use `configTypeAware` to control to which files such rules will be applied to, if any.
536
+ Rules [requiring type information](https://typescript-eslint.io/rules/?=typeInformation), which are [known to be performance-demanding](https://typescript-eslint.io/getting-started/typed-linting/#performance), are *enabled* by default, and will be applied to the same files as `ts` config is applied to.
537
+ It's just a little heads up; you should make your own decision whether to keep them enabled.
538
+ Use `configTypeAware` to control to which files such rules will be applied to, if any.
500
539
 
501
540
  ### Frontend frameworks
502
541
 
503
- We detect the version of the used frontend framework (Angular, Vue, Svelte, etc.) and apply the appropriate rules depending on the version. You can always manually specify the version using an appropriate option. Consult JSDoc of each config for more details.
542
+ We detect the version of the used frontend framework (Angular, Vue, Svelte, etc.) and apply the appropriate rules depending on the version.
543
+ You can always manually specify the version using an appropriate option.
544
+ Consult JSDoc of each config for more details.
504
545
 
505
546
  #### Vue
506
547
 
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.
548
+ 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.
549
+ If you have `.vue` files authored in both TypeScript and JavaScript, use `enforceTypescriptInScriptSection.{files,ignores}` to manually specify TS & JS Vue components respectively.
550
+ It is not currently possible to apply different ESLint rules depending on the value of `lang` attribute of `<script>` SFC section.
508
551
 
509
552
  #### Angular
510
553
 
511
- We support Angular versions from 13 to 20, all at once. You are expected to install `@angular-eslint/eslint-plugin` and `@angular-eslint/eslint-plugin-template` packages of the same major version as your Angular version, but installing a greater version would also likely work. With the latter, you can use the rules added in newer versions of `@angular-eslint/eslint-plugin*` on older Angular codebases.
554
+ We support Angular versions from 13 to 20, all at once.
555
+ You are expected to install `@angular-eslint/eslint-plugin` and `@angular-eslint/eslint-plugin-template` packages of the same major version as your Angular version, but installing a greater version would also likely work.
556
+ With the latter, you can use the rules added in newer versions of `@angular-eslint/eslint-plugin*` on older Angular codebases.
512
557
 
513
558
  #### React
514
559
 
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.
560
+ We use rules from several plugins to lint your React code.
561
+ 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.
516
562
 
517
563
  ### Markdown
518
564
 
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 ```.
565
+ 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.
566
+ 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 ```.
520
567
 
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.
568
+ 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).
569
+ You can find the full list of disabled rules in `src/configs/markdown.ts` file.
522
570
 
523
571
  ### Tailwind CSS
524
572
 
@@ -542,11 +590,14 @@ See [Rules configuration](#rules-configuration-configs-and-extraconfigs-option).
542
590
 
543
591
  ### `ignores`
544
592
 
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`.
593
+ Specifies a list of globally ignored files.
594
+ 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`.
546
595
 
547
596
  ### `extraPlugins`
548
597
 
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.
598
+ Allows to provide additional ESLint plugins.
599
+ Their prefixes and possibly rule names will appear in configs' `rules` property type.
600
+ They, like all the built-in plugins, by default will be loaded only if used.
550
601
 
551
602
  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
603
 
@@ -556,18 +607,21 @@ Sets [`linterOptions.{noInlineConfig,reportUnusedDisableDirectives,reportUnusedI
556
607
 
557
608
  ### `defaultConfigsStatus`
558
609
 
559
- Quickly enable multiple configs at once. Possible options:
610
+ Quickly enable multiple configs at once.
611
+ Possible options:
560
612
 
561
613
  - `all-disabled`: consider all top level configs disabled unless explicitly enabled.
562
614
  - `misc-enabled`: consider some configs disabled by default (see the list in JSDoc).
563
615
 
564
616
  ### `mode`
565
617
 
566
- 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.
618
+ Type of your project, either application (`app`, default) or library (`lib`).
619
+ Will affect certain rules, actual list of which is written in JSDoc of this option.
567
620
 
568
621
  ### `forceSeverity`
569
622
 
570
- 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.
623
+ Globally forces non-zero severity of all the rules configured by eslint-config-un (i.e. not within `overrides`, `overridesAny` or [`extraConfigs`](#extraconfigs)).
624
+ This can also be configured per-config.
571
625
 
572
626
  ### `pluginRenames`
573
627
 
@@ -575,13 +629,15 @@ See [Plugin prefixes](#plugin-prefixes-pluginrenames-option).
575
629
 
576
630
  ### `pluginOverrides`
577
631
 
578
- 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.
632
+ Override implementation of some of the plugins.
633
+ 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.
579
634
 
580
635
  ### `loadPluginsOnDemand`
581
636
 
582
637
  This option allows to decide whether whether ESLint plugins will be loaded if they are actually used (`true` by default).
583
638
 
584
- 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).
639
+ Using object notation, you can also specify concrete plugins that will be loaded.
640
+ 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).
585
641
 
586
642
  ### `autofixDisabledGloballyFor`
587
643
 
@@ -589,7 +645,9 @@ See [Globally disabling rule autofix](#globally-disabling-rule-autofix).
589
645
 
590
646
  ### `gitignore`
591
647
 
592
- 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.
648
+ 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.
649
+ Set this option to `false` to disable this behavior.
650
+ You may also provide an object which configures [eslint-config-flat-gitignore](https://npmjs.com/eslint-config-flat-gitignore), which actually provides this functionality.
593
651
 
594
652
  ### `offlineMode`
595
653
 
@@ -599,12 +657,16 @@ It can also be enabled by setting `ESLINT_CONFIG_UN_OFFLINE_MODE` environment va
599
657
 
600
658
  ### `cacheConfigs`
601
659
 
602
- 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.
660
+ Enables flat config caching.
661
+ This option is enabled by default when running in editor (detected by [`is-in-editor`](https://npmjs.com/is-in-editor)).
662
+ 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.
603
663
 
604
664
  There are 2 layers of caching:
605
665
 
606
- - 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.
607
- - 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.
666
+ - 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.
667
+ This is an **extremely fast** caching option.
668
+ - In file system: the cache will be stored in `node_modules/.cache/eslint-config-un/config.json`.
669
+ Note that in this case caching might fail if the config contains unserializable data, such as functions.
608
670
 
609
671
  The cache, regardless of the storage, is considered fresh for 1 hour, unless one of the following is changed:
610
672
 
@@ -615,7 +677,8 @@ The cache, regardless of the storage, is considered fresh for 1 hour, unless one
615
677
 
616
678
  ### `disablePrettierIncompatibleRules`
617
679
 
618
- 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.
680
+ 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.
681
+ Defaults to `true` if `prettier` package is installed.
619
682
 
620
683
  ### `useFastImport`
621
684
 
@@ -631,22 +694,27 @@ Re-exported default export from [`globals` package](https://npmjs.com/globals),
631
694
 
632
695
  #### `isInCi`
633
696
 
634
- The constant showing if the current process is *likely* running in CI. Info provided by [`ci-info` package](https://npmjs.com/ci-info).
697
+ The constant showing if the current process is *likely* running in CI.
698
+ Info provided by [`ci-info` package](https://npmjs.com/ci-info).
635
699
 
636
- Use case: disable or enable certain rules or features in CI. Use with caution!
700
+ Use case: disable or enable certain rules or features in CI.
701
+ Use with caution!
637
702
 
638
703
  #### `isInEditor`
639
704
 
640
- 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).
705
+ The constant showing if the current process is *likely* running within editor.
706
+ Info provided by [`is-in-editor` package](https://npmjs.com/is-in-editor).
641
707
 
642
708
  Use case: disable or enable certain rules or features in editor, likely to improve performance.
643
709
 
644
710
  > [!WARNING]
645
- > 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.
711
+ > 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.
712
+ > 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.
646
713
 
647
714
  #### `DEFAULT_GLOBAL_IGNORES`
648
715
 
649
- Default list of global `ignores` values set by eslint-config-un. See also [`ignores` option](#ignores)
716
+ Default list of global `ignores` values set by eslint-config-un.
717
+ See also [`ignores` option](#ignores)
650
718
 
651
719
  #### `RuleOptions`
652
720
 
@@ -665,23 +733,28 @@ Please refer to JSDoc of exported symbols for proper documentation.
665
733
 
666
734
  #### `createNoRestricted*Rule`
667
735
 
668
- 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.
736
+ Utility functions re-exported from [`eslint-no-restricted` package](https://npmjs.com/eslint-no-restricted) which generate `no-restricted-*` rules.
737
+ Please refer to [the package documentation](https://github.com/bradzacher/eslint-no-restricted#readme) for more info.
669
738
 
670
739
  ## FAQ
671
740
 
672
741
  ### How do I add my own flat configs?
673
742
 
674
- Use `extraConfigs` option. The configs provided there will be placed after all the eslint-config-un's configs, and before the config which disables Prettier incompatible rules for all files. These configs have a richer `rules` option, which allows you to apply more settings like `overrides` option does.
743
+ Use `extraConfigs` option.
744
+ The configs provided there will be placed after all the eslint-config-un's configs, and before the config which disables Prettier incompatible rules for all files.
745
+ These configs have a richer `rules` option, which allows you to apply more settings like `overrides` option does.
675
746
 
676
747
  Alternatively, you can `await` the `eslintConfig()` function and then add your own flat configs to whatever place you like (we recommend use [flat config composer from `eslint-flat-config-utils` package](https://npmjs.com/eslint-flat-config-utils)) for this purpose.
677
748
 
678
749
  ### Do I have to install any of the used plugins?
679
750
 
680
- 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.
751
+ 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.
752
+ Please run ESLint with our config once to get the list of dependencies to be installed manually.
681
753
 
682
754
  ### How do I know how eslint-config-un configures rules?
683
755
 
684
- It's too much to document, so please have a look at the source code of our config. All the configs are placed inside `src/configs` directory.
756
+ It's too much to document, so please have a look at the source code of our config.
757
+ All the configs are placed inside `src/configs` directory.
685
758
 
686
759
  ### How does exactly eslint-config-un knows if some package is installed?
687
760
 
@@ -689,7 +762,8 @@ We use [`import-meta-resolve`](https://npmjs.com/import-meta-resolve) package to
689
762
 
690
763
  ### How can I know which configs will be enabled, for which rules autofix will be disabled, etc.?
691
764
 
692
- 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.
765
+ You can enable the debug mode by setting `DEBUG=eslint-config-un` environment variable when running ESLint command.
766
+ 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.
693
767
 
694
768
  Alternatively, you can use [`@eslint/config-inspector`](https://npmjs.com/@eslint/config-inspector) to inspect the final config.
695
769
 
@@ -697,16 +771,22 @@ Alternatively, you can use [`@eslint/config-inspector`](https://npmjs.com/@eslin
697
771
 
698
772
  ### Prerequisites
699
773
 
700
- 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.
774
+ Node.JS and ESLint satisfy [minimum required versions](#installation).
775
+ Please don't attempt to migrate to ESLint 9 and eslint-config-un at the same time.
701
776
 
702
777
  ### Migration guide
703
778
 
704
- We recommend that every step and sub-step below is done in a separate commit and on a separate git branch. Before committing, please do also run tests, formatter, other linters and tools to ensure that nothing became broken, if you have any.
779
+ We recommend that every step and sub-step below is done in a separate commit and on a separate git branch.
780
+ Before committing, please do also run tests, formatter, other linters and tools to ensure that nothing became broken, if you have any.
705
781
 
706
- 1. Remove **ALL** ESLint related *dev* 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.
707
- 2. If you're using `.js` config file, we highly recommend that you migrate to `.ts` one, or at least add `@ts-check` TypeScript directive to the former. Please don't forget install [`jiti`](https://npmjs.com/jiti) for ESLint to able be to read your TypeScript config file.
782
+ 1. Remove **ALL** ESLint related *dev* dependencies - be it plugins, parsers, whatever else or `eslint` itself.
783
+ This ensures correct versions of plugins will be resolved by eslint-config-un and saves you from other weird and hard to debug problems.
784
+ 2. If you're using `.js` config file, we highly recommend that you migrate to `.ts` one, or at least add `@ts-check` TypeScript directive to the former.
785
+ Please don't forget install [`jiti`](https://npmjs.com/jiti) for ESLint to able be to read your TypeScript config file.
708
786
  3. Following your intuition or/and configs' options JSDoc documentation, migrate the existing config to the closest eslint-config-un equivalent.
709
- 1. Run ESLint for the first time (without `--fix`!). The list of dependencies to be installed might be shown to you. 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.
787
+ 1. Run ESLint for the first time (without `--fix`!).
788
+ The list of dependencies to be installed might be shown to you.
789
+ 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.
710
790
  2. Rename rules on existing [`eslint` configuration comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments) if they have different plugin prefixes (the most common case is that `typescript-eslint` plugin has `ts` prefix in eslint-config-un instead of `@typescript-eslint`) **OR** change prefixes using [`pluginRenames` option](#plugin-prefixes-pluginrenames-option).
711
791
  4. Perform the following two steps in any order:
712
792
  1. Enable stylistic rules only and fix them automatically (if you wish to do so) by running ESLint with `--fix --fix-type problem,suggestion,layout` (the latter flag ensures auto removal of "unused" `eslint-disable` comments will not happen):
@@ -723,10 +803,13 @@ We recommend that every step and sub-step below is done in a separate commit and
723
803
  **Note:** not every stylistic rule is auto-fixable and not all auto-fixes are safe to apply automatically (although we already maintain a list of rules for which we've disabled autofixes by default for these reasons).
724
804
 
725
805
  Please carefully review automatically applied fixes and do not forget about problems requiring manual intervention.
726
- 2. 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:
806
+ 2. Set `configs.noStylisticRules` to `true` to disable purely stylistic rules and run ESLint for the first time with the new config.
807
+ 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).
808
+ Thoroughly go through the report and:
727
809
  - Decide which rules need to be disabled, enabled or changed the options of;
728
810
  - Decide which `eslint-ignore` comments are no longer relevant and should be removed;
729
- - 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);
811
+ - 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.
812
+ 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);
730
813
  - Add `<!-- eslint-skip -->` comments before fenced code blocks in Markdown files for which code parsing is failing;
731
814
  - Fix/resolve any other issues and difficulties.
732
815
  5. Remove `noStylisticRules` config and probably re-run ESLint as you would do normally to make sure everything is working as intended.
@@ -735,10 +818,11 @@ We recommend that every step and sub-step below is done in a separate commit and
735
818
 
736
819
  ### Why are there reports from `node` plugin in my frontend code?
737
820
 
738
- 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.
821
+ All code is assumed to be Node.JS code by default (`eslint-plugin-n` plugin is run on such code).
822
+ Please specify `files`, `ignores` or disable `node` config altogether to avoid false positives.
739
823
 
740
824
  <!-- eslint-disable-next-line markdown-preferences/heading-casing -->
741
- ### TypeError: Key `languageOptions`: Key `globals`: Global `AudioWorkletGlobalScope ` has leading or trailing whitespace.
825
+ ### TypeError: Key `languageOptions`: Key `globals`: Global `AudioWorkletGlobalScope ` has leading or trailing whitespace
742
826
 
743
827
  Install `globals` package as a dev dependency.
744
828
 
package/dist/angular.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { F as WARNING, M as OFF, _ as GLOB_JS_TS_X, r as ERROR, u as GLOB_HTML } from "./constants.mjs";
2
- import { c as fetchPackageInfo, r as assignDefaults } from "./utils.mjs";
1
+ import { L as WARNING, P as OFF, r as ERROR, u as GLOB_HTML, v as GLOB_JS_TS_X } from "./constants.mjs";
2
+ import { i as assignDefaults, l as fetchPackageInfo } from "./utils.mjs";
3
3
  import { s as pluginsLoaders, t as generatePackageToLoadProperty } from "./loaders.mjs";
4
4
  import "./configs.mjs";
5
5
 
package/dist/antfu.mjs ADDED
@@ -0,0 +1,20 @@
1
+ import { P as OFF, v as GLOB_JS_TS_X } from "./constants.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
+ import "./configs.mjs";
4
+
5
+ //#region src/configs/antfu.ts
6
+ var antfu_default = ((context, optionsRaw) => {
7
+ const optionsResolved = assignDefaults(optionsRaw, {});
8
+ const configBuilder = context.createConfigBuilder(optionsResolved, "antfu");
9
+ configBuilder?.addConfig(["antfu", {
10
+ includeDefaultFilesAndIgnores: true,
11
+ filesFallback: [GLOB_JS_TS_X]
12
+ }]).addRule("consistent-chaining", OFF).addRule("consistent-list-newline", OFF).addRule("curly", OFF).addRule("if-newline", OFF).addRule("import-dedupe", OFF).addRule("indent-unindent", OFF).addRule("no-import-dist", OFF).addRule("no-import-node-modules-by-path", OFF).addRule("no-top-level-await", OFF).addRule("no-ts-export-equal", OFF).addRule("top-level-function", OFF).enableConfigTesterForPlugin("antfu").addOverrides();
13
+ return {
14
+ configs: [configBuilder],
15
+ optionsResolved
16
+ };
17
+ });
18
+
19
+ //#endregion
20
+ export { antfu_default as default };
package/dist/astro.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { F as WARNING, M as OFF, i as GLOB_ASTRO, r as ERROR } from "./constants.mjs";
2
- import { r as assignDefaults } from "./utils.mjs";
1
+ import { L as WARNING, P as OFF, i as GLOB_ASTRO, r as ERROR } from "./constants.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
3
  import { s as pluginsLoaders, t as generatePackageToLoadProperty } from "./loaders.mjs";
4
4
  import "./configs.mjs";
5
5
 
package/dist/ava.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { F as WARNING, M as OFF, r as ERROR, v as GLOB_JS_TS_X_EXTENSION } from "./constants.mjs";
2
- import { r as assignDefaults } from "./utils.mjs";
1
+ import { L as WARNING, P as OFF, r as ERROR, y as GLOB_JS_TS_X_EXTENSION } from "./constants.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
3
  import "./configs.mjs";
4
4
  import { c as generateDefaultTestFiles, o as generateConfigNoOnlyTestsBuilder, r as RULES_TO_DISABLE_IN_TEST_FILES } from "./shared.mjs";
5
5
 
@@ -1,5 +1,5 @@
1
- import { F as WARNING, M as OFF, r as ERROR } from "./constants.mjs";
2
- import { r as assignDefaults } from "./utils.mjs";
1
+ import { L as WARNING, P as OFF, r as ERROR } from "./constants.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
3
  import "./configs.mjs";
4
4
 
5
5
  //#region src/configs/better-tailwind.ts
@@ -0,0 +1,18 @@
1
+ import { P as OFF, r as ERROR } from "./constants.mjs";
2
+ import { T as objectEntriesUnsafe, i as assignDefaults, x as kebabCase } from "./utils.mjs";
3
+ import "./configs.mjs";
4
+
5
+ //#region src/configs/boundaries.ts
6
+ var boundaries_default = ((context, optionsRaw) => {
7
+ const optionsResolved = assignDefaults(optionsRaw, {});
8
+ const { settings: pluginSettings } = optionsResolved;
9
+ const configBuilder = context.createConfigBuilder(optionsResolved, "boundaries");
10
+ configBuilder?.addConfig(["boundaries", { includeDefaultFilesAndIgnores: true }], { settings: { ...Object.fromEntries(objectEntriesUnsafe(pluginSettings || {}).map(([settingName, settingValue]) => [`boundaries/${kebabCase(settingName)}`, settingValue])) } }).addRule("element-types", ERROR).addRule("entry-point", ERROR).addRule("external", ERROR).addRule("no-ignored", OFF).addRule("no-private", ERROR).addRule("no-unknown", OFF).addRule("no-unknown-files", OFF).enableConfigTesterForPlugin("boundaries").addOverrides();
11
+ return {
12
+ configs: [configBuilder],
13
+ optionsResolved
14
+ };
15
+ });
16
+
17
+ //#endregion
18
+ export { boundaries_default as default };
@@ -1,5 +1,5 @@
1
1
  import { r as ERROR } from "./constants.mjs";
2
- import { r as assignDefaults } from "./utils.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
3
  import "./configs.mjs";
4
4
 
5
5
  //#region src/configs/case-police.ts
@@ -1,5 +1,5 @@
1
- import { M as OFF } from "./constants.mjs";
2
- import { r as assignDefaults } from "./utils.mjs";
1
+ import { P as OFF } from "./constants.mjs";
2
+ import { i as assignDefaults } from "./utils.mjs";
3
3
  import { t as generatePackageToLoadProperty } from "./loaders.mjs";
4
4
  import "./configs.mjs";
5
5