@shayanthenerd/eslint-config 0.24.1 → 0.26.0

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 (40) hide show
  1. package/README.md +69 -59
  2. package/dist/configs/base.mjs +1 -1
  3. package/dist/configs/baseline.mjs +22 -0
  4. package/dist/configs/css.mjs +6 -6
  5. package/dist/configs/html.mjs +8 -8
  6. package/dist/configs/next.mjs +20 -0
  7. package/dist/configs/react.mjs +29 -0
  8. package/dist/helpers/globs.mjs +2 -11
  9. package/dist/helpers/ignores/defaultIgnorePatterns.mjs +1 -0
  10. package/dist/helpers/isPackageDetected.mjs +1 -1
  11. package/dist/helpers/options/defaultOptions.mjs +48 -11
  12. package/dist/helpers/options/enableDetectedConfigs.mjs +33 -14
  13. package/dist/index.mjs +11 -7
  14. package/dist/prettier.config.mjs +1 -1
  15. package/dist/rules/astro.mjs +1 -0
  16. package/dist/rules/baseline.mjs +23 -0
  17. package/dist/rules/css.mjs +27 -6
  18. package/dist/rules/html.mjs +7 -7
  19. package/dist/rules/javascript.mjs +2 -3
  20. package/dist/rules/next.mjs +28 -0
  21. package/dist/rules/packageJson.mjs +1 -5
  22. package/dist/rules/react.mjs +160 -0
  23. package/dist/rules/typescript.mjs +1 -1
  24. package/dist/rules/unicorn.mjs +97 -1
  25. package/dist/rules/vue.mjs +2 -2
  26. package/dist/types/eslint-schema.d.mts +2384 -348
  27. package/dist/types/index.d.mts +56 -29
  28. package/dist/types/options/base.d.mts +0 -16
  29. package/dist/types/options/baseline.d.mts +106 -0
  30. package/dist/types/options/nuxt.d.mts +1 -2
  31. package/dist/types/options/react.d.mts +50 -0
  32. package/dist/types/options/stylistic.d.mts +1 -1
  33. package/dist/types/options/test.d.mts +1 -1
  34. package/dist/types/options/typescript.d.mts +1 -1
  35. package/dist/types/options/vue.d.mts +1 -1
  36. package/package.json +22 -17
  37. package/dist/configs/restrictedDefaultExports.mjs +0 -16
  38. package/dist/types/options/css.d.mts +0 -27
  39. package/dist/types/options/html.d.mts +0 -27
  40. package/dist/types/options/perfectionist.d.mts +0 -18
@@ -1,16 +1,15 @@
1
- import { PluginRules } from "./eslintRules.mjs";
2
- import { CSSOptions } from "./options/css.mjs";
1
+ import { PluginRules, RuleOptions } from "./eslintRules.mjs";
3
2
  import { VueOptions } from "./options/vue.mjs";
4
3
  import { ZodOptions } from "./options/zod.mjs";
5
4
  import { BaseOptions } from "./options/base.mjs";
6
- import { HTMLOptions } from "./options/html.mjs";
7
5
  import { NuxtOptions } from "./options/nuxt.mjs";
8
6
  import { TestOptions } from "./options/test.mjs";
7
+ import { ReactOptions } from "./options/react.mjs";
8
+ import { BaselineOptions } from "./options/baseline.mjs";
9
9
  import { MarkdownOptions } from "./options/markdown.mjs";
10
10
  import { TailwindOptions } from "./options/tailwind.mjs";
11
11
  import { StylisticOptions } from "./options/stylistic.mjs";
12
12
  import { TypeScriptOptions } from "./options/typescript.mjs";
13
- import { PerfectionistOptions } from "./options/perfectionist.mjs";
14
13
  import { Linter } from "eslint";
15
14
 
16
15
  //#region src/types/index.d.ts
@@ -40,17 +39,15 @@ interface Options {
40
39
  */
41
40
  autoDetectDeps?: boolean | 'verbose';
42
41
  /**
43
- * Specify the runtime environment to correctly resolve its built-in modules
44
- *
45
- * This is used by
46
- *
47
- * - [ESLint: Specifying Globals](https://eslint.org/docs/latest/use/configure/language-options#using-configuration-files)
48
- * - [perfectionist/sort-imports: `env` option](https://perfectionist.dev/rules/sort-imports#environment)
49
- *
50
- * to recognize the environment’s built-in modules.
51
- *
52
- * @default 'node'
53
- */
42
+ * Specify the runtime environment.
43
+ *
44
+ * This is used by
45
+ * - `configs.useBaseline` option (disabled when `env` is set to a value other than `'browser'`)
46
+ * - [ESLint: Specifying Globals](https://eslint.org/docs/latest/use/configure/language-options#using-configuration-files)
47
+ * - [perfectionist/sort-imports: `env` option](https://perfectionist.dev/rules/sort-imports#environment)
48
+ *
49
+ * @default 'browser'
50
+ */
54
51
  env?: 'bun' | 'deno' | 'node' | 'browser';
55
52
  /**
56
53
  * Path to the _.gitignore_ file (relative to the current working directory).
@@ -80,20 +77,16 @@ interface Options {
80
77
  /**
81
78
  * The path and the name of the root TypeScript config file.
82
79
  *
83
- * If you don't use TypeScript, provide the path and the name of the root JavaScript config file.
84
- *
85
80
  * This is used by
86
81
  * - [better-tailwindcss: `tsconfig` option](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md#tsconfig)
87
82
  * - [perfectionist/sort-imports: `tsconfig` option](https://perfectionist.dev/rules/sort-imports#tsconfig)
88
83
  *
89
- * @default undefined // `{ rootDir: '.', filename: 'tsconfig.json' }` if "typescript" is detected in the dependencies when `autoDetectDeps` is enabled
84
+ * @default undefined // `{ rootDir: '.', filename: 'tsconfig.json' }` if TypeScript integration is enabled
90
85
  */
91
86
  tsConfig?: false | {
92
87
  /**
93
88
  * The name of the root TypeScript config file.
94
89
  *
95
- * If you don't use TypeScript, provide the name of the root JavaScript config file.
96
- *
97
90
  * It will fall back to the default value if set to an empty string (`''`).
98
91
  *
99
92
  * @default 'tsconfig.json'
@@ -101,8 +94,6 @@ interface Options {
101
94
  filename?: string;
102
95
  /**
103
96
  * The directory of the root TypeScript config file.
104
- *
105
- * If you don't use TypeScript, provide the directory of the root JavaScript config file.
106
97
  *
107
98
  * It will fall back to the default value if set to an empty string (`''`).
108
99
  *
@@ -252,7 +243,7 @@ interface Options {
252
243
  */
253
244
  configs?: {
254
245
  /**
255
- * Use [eslint-plugin-astro](https://ota-meshi.github.io/eslint-plugin-astro) to enforce Astro best practices and accessibility guidelines.
246
+ * Use [eslint-plugin-astro](https://ota-meshi.github.io/eslint-plugin-astro) and [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) to enforce Astro best practices and accessibility guidelines.
256
247
  *
257
248
  * @default false // `true` if "astro" is detected in the dependencies when `autoDetectDeps` is enabled
258
249
  */
@@ -268,13 +259,22 @@ interface Options {
268
259
  *
269
260
  * @default false
270
261
  */
271
- css?: boolean | CSSOptions;
262
+ css?: boolean | ConfigWithOverrides<PluginRules<'css'>>;
272
263
  /**
273
264
  * Use [@html-eslint/eslint-plugin](https://html-eslint.org) to enforce SEO and accessibility best practices, as well as some stylistic rules.
274
265
  *
275
266
  * @default false
276
267
  */
277
- html?: boolean | HTMLOptions;
268
+ html?: boolean | (ConfigWithOverrides<PluginRules<'@html-eslint'>> & {
269
+ /**
270
+ * Enforce consistent naming convention for `id` attribute values.
271
+ *
272
+ * @default 'snake_case'
273
+ *
274
+ * @see [@html-eslint/id-naming-convention](https://html-eslint.org/docs/rules/id-naming-convention)
275
+ */
276
+ idNamingConvention?: Exclude<RuleOptions<'@html-eslint/id-naming-convention'>, 'regex'>;
277
+ });
278
278
  /**
279
279
  * Use [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) to organize imports and exports, and detect related issues.
280
280
  *
@@ -287,6 +287,12 @@ interface Options {
287
287
  * @default true
288
288
  */
289
289
  markdown?: boolean | MarkdownOptions;
290
+ /**
291
+ * Use [@next/eslint-plugin-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-plugin-next) to enforce Next.js best practices and catch common mistakes.
292
+ *
293
+ * @default false // `true` if "next" is detected in the dependencies when `autoDetectDeps` is enabled
294
+ */
295
+ next?: boolean | ConfigWithOverrides<PluginRules<'next'>>;
290
296
  /**
291
297
  * Use [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) to enforce Node.js best practices and catch common mistakes.
292
298
  *
@@ -316,13 +322,28 @@ interface Options {
316
322
  *
317
323
  * @default true
318
324
  */
319
- perfectionist?: boolean | PerfectionistOptions;
325
+ perfectionist?: boolean | (ConfigWithOverrides<PluginRules<'perfectionist'>> & {
326
+ /**
327
+ * The type of sorting.
328
+ *
329
+ * @default 'line-length'
330
+ *
331
+ * @see [Perfectionist Settings: `type` option](https://perfectionist.dev/guide/getting-started#settings)
332
+ */
333
+ sortType?: Exclude<RuleOptions<'perfectionist/sort-imports'>['type'], 'type-import-first'>;
334
+ });
320
335
  /**
321
336
  * Use [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise) to enforce best practices for JavaScript promises.
322
337
  *
323
338
  * @default true
324
339
  */
325
340
  promise?: boolean | ConfigWithOverrides<PluginRules<'promise'>>;
341
+ /**
342
+ * Use [@eslint-react/eslint-plugin](https://eslint-react.xyz), [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), and [@html-eslint/eslint-plugin-react](https://html-eslint.org/docs/react/getting-started) to enforce React best practices and accessibility guidelines.
343
+ *
344
+ * @default false // `true` if "react" is detected in the dependencies when `autoDetectDeps` is enabled
345
+ */
346
+ react?: boolean | ReactOptions;
326
347
  /**
327
348
  * Use [@stylistic/eslint-plugin](https://eslint.style) to enforce stylistic rules such as indentation, line length, spacing, quotes, semicolons, etc.
328
349
  *
@@ -340,11 +361,11 @@ interface Options {
340
361
  */
341
362
  test?: TestOptions;
342
363
  /**
343
- * Use [typescript-eslint](https://typescript-eslint.io) to enforce TypeScript-specific rules.
364
+ * Use [@typescript-eslint](https://typescript-eslint.io) to enforce TypeScript-specific rules.
344
365
  *
345
366
  * Setting this to `false` doesn't prevent ESLint from linting TypeScript files.
346
367
  *
347
- * This enables
368
+ * This allows
348
369
  * - [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) to better understand imports from TypeScript files such as ".ts", ".tsx", etc.
349
370
  * - [eslint-plugin-vue](https://eslint.vuejs.org) to enforce TypeScript-specific rules in the `<script setup lang="ts">` of Vue SFCs.
350
371
  *
@@ -357,6 +378,12 @@ interface Options {
357
378
  * @default true
358
379
  */
359
380
  unicorn?: boolean | ConfigWithOverrides<PluginRules<'unicorn'>>;
381
+ /**
382
+ * Use [eslint-plugin-baseline-js](https://github.com/3ru/eslint-plugin-baseline-js), [css/use-baseline](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#options), [@html-eslint/use-baseline](https://html-eslint.org/docs/rules/use-baseline#options), and [@html-eslint/react/use-baseline](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#options) to enforce the use of baseline features.
383
+ *
384
+ * @default true // `false` if `env` is set to a value other than `'browser'`
385
+ */
386
+ useBaseline?: boolean | BaselineOptions;
360
387
  /**
361
388
  * Use [eslint-plugin-vue](https://eslint.vuejs.org) to enforce Vue best practices, accessibility guidelines, stylistic rules, and identify mistakes.
362
389
  *
@@ -364,7 +391,7 @@ interface Options {
364
391
  */
365
392
  vue?: boolean | VueOptions;
366
393
  /**
367
- * Use [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod) or [eslint-plugin-zod-mini](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod-mini) to enforce best practices for Zod schemas.
394
+ * Use [eslint-plugin-zod](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod) or [eslint-plugin-zod-mini](https://github.com/marcalexiei/eslint-zod/tree/main/plugins/eslint-plugin-zod-mini) to enforce best practices for defining Zod schemas.
368
395
  *
369
396
  * @default false // `true` if "zod" is detected in the dependencies when `autoDetectDeps` is enabled
370
397
  */
@@ -31,22 +31,6 @@ interface BaseOptions extends ConfigWithOverrides<CoreRules> {
31
31
  * @see [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
32
32
  */
33
33
  maxNestedCallbacks?: Exclude<MaxNestedCallbacksOptions, Record<string, unknown>>;
34
- /**
35
- * Enforce named exports in the following directories:
36
- * - shared
37
- * - dto, dtos
38
- * - model, models
39
- * - helper, helpers
40
- * - module, modules
41
- * - util, utils, utilities
42
- * - composable, composables
43
- * - repo, repos, repository, repositories
44
- *
45
- * @default true
46
- *
47
- * @see [no-restricted-exports: `restrictDefaultExports` option](https://eslint.org/docs/latest/rules/no-restricted-exports#options)
48
- */
49
- preferNamedExports?: boolean;
50
34
  }
51
35
  //#endregion
52
36
  export type { BaseOptions };
@@ -0,0 +1,106 @@
1
+ import { PluginRules, RuleOptions } from "../eslintRules.mjs";
2
+ import { ConfigWithOverrides } from "../index.mjs";
3
+
4
+ //#region src/types/options/baseline.d.ts
5
+ type ConfigRules = PluginRules<'baseline-js'>;
6
+ type CssBaselineOptions = RuleOptions<'css/use-baseline'>;
7
+ interface BaselineOptions extends ConfigWithOverrides<ConfigRules> {
8
+ /**
9
+ * Enforce the use of baseline features in HTML, CSS, JavaScript, and React.
10
+ *
11
+ * Aside from `'widely'` and `'newly'`, it can also be set to a numeric baseline year, such as `2025`, to allow features that became baseline newly available that year or earlier. Minimum numeric baseline year is `2000`.
12
+ *
13
+ * @default 'widely'
14
+ *
15
+ * @see [@typescript-eslint/method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
16
+ */
17
+ baseline?: RuleOptions<'baseline-js/use-baseline'>['available'];
18
+ /**
19
+ * Allow certain CSS features to be used even if they are not baseline features.
20
+ *
21
+ * @see [css/use-baseline: options](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#options)
22
+ */
23
+ css?: {
24
+ /**
25
+ * At-rules that are allowed to be used regardless of the baseline.
26
+ *
27
+ * @default []
28
+ *
29
+ * @see [css/use-baseline: `allowedAtRules` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowatrules)
30
+ */
31
+ allowedAtRules?: CssBaselineOptions['allowAtRules'];
32
+ /**
33
+ * Functions that are allowed to be used regardless of the baseline.
34
+ *
35
+ * @default []
36
+ *
37
+ * @see [css/use-baseline: `allowedFunctions` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowfunctions)
38
+ */
39
+ allowedFunctions?: CssBaselineOptions['allowFunctions'];
40
+ /**
41
+ * Media conditions inside `@media` that are allowed to be used regardless of the baseline.
42
+ *
43
+ * @default []
44
+ *
45
+ * @see [css/use-baseline: `allowedMediaConditions` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowmediaconditions)
46
+ */
47
+ allowedMediaConditions?: CssBaselineOptions['allowMediaConditions'];
48
+ /**
49
+ * Properties that are allowed to be used regardless of the baseline.
50
+ *
51
+ * @default []
52
+ *
53
+ * @see [css/use-baseline: `allowedProperties` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowproperties)
54
+ */
55
+ allowedProperties?: CssBaselineOptions['allowProperties'];
56
+ /**
57
+ * Properties that are allowed to be used regardless of the baseline, mapped to their allowed identifier values.
58
+ *
59
+ * @default {}
60
+ *
61
+ * @see [css/use-baseline: `allowedPropertyValues` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowpropertyvalues)
62
+ */
63
+ allowedPropertyValues?: Partial<CssBaselineOptions['allowPropertyValues']>;
64
+ /**
65
+ * Selectors that are allowed to be used regardless of the baseline.
66
+ *
67
+ * @default []
68
+ *
69
+ * @see [css/use-baseline: `allowedSelectors` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowselectors)
70
+ */
71
+ allowedSelectors?: CssBaselineOptions['allowSelectors'];
72
+ /**
73
+ * Units that are allowed to be used regardless of the baseline.
74
+ *
75
+ * @default []
76
+ *
77
+ * @see [css/use-baseline: `allowedUnits` option](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md#allowunits)
78
+ */
79
+ allowedUnits?: CssBaselineOptions['allowUnits'];
80
+ };
81
+ /**
82
+ * Allow certain JavaScript features to be used even if they are not baseline features.
83
+ *
84
+ * @see [baseline-js/use-baseline: options](https://github.com/eslint/baseline-js/blob/main/docs/rules/use-baseline.md#options)
85
+ */
86
+ javascript?: {
87
+ /**
88
+ * Feature IDs or regex patterns for features that are allowed to be used regardless of the baseline.
89
+ *
90
+ * @default []
91
+ *
92
+ * @see [baseline-js/use-baseline: `ignoreFeatures` option](https://github.com/3ru/eslint-plugin-baseline-js#options-rule)
93
+ */
94
+ ignoredFeatures?: RuleOptions<'baseline-js/use-baseline'>['ignoreFeatures'];
95
+ /**
96
+ * ESTree `node.type`s or regex patterns for node types that are allowed to be used regardless of the baseline.
97
+ *
98
+ * @default []
99
+ *
100
+ * @see [baseline-js/use-baseline: `ignoreNodeTypes` option](https://github.com/3ru/eslint-plugin-baseline-js#options-rule)
101
+ */
102
+ ignoredNodeTypes?: RuleOptions<'baseline-js/use-baseline'>['ignoreNodeTypes'];
103
+ };
104
+ }
105
+ //#endregion
106
+ export type { BaselineOptions };
@@ -13,8 +13,7 @@ interface NuxtOptions {
13
13
  /**
14
14
  * The name of the icon component.
15
15
  *
16
- * This is used by
17
- * [vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components)
16
+ * This is used by [vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components)
18
17
  * to detect the icon component.
19
18
  *
20
19
  * It will fall back to the default value if set to an empty string (`''`).
@@ -0,0 +1,50 @@
1
+ import { PluginRules, RuleOptions } from "../eslintRules.mjs";
2
+ import { ConfigWithOverrides } from "../index.mjs";
3
+
4
+ //#region src/types/options/react.d.ts
5
+ type ConfigRules = PluginRules<'react'>;
6
+ interface ReactOptions extends ConfigWithOverrides<ConfigRules> {
7
+ /**
8
+ * Use [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) and [@html-eslint/eslint-plugin-react](https://html-eslint.org/docs/react/getting-started) to enforce accessibility standards for React components.
9
+ *
10
+ * @default true
11
+ */
12
+ accessibility?: boolean | {
13
+ /**
14
+ * Names of components that render an `<a>` element.
15
+ *
16
+ * New items extend the defaults instead of overriding them.
17
+ *
18
+ * This is used by
19
+ * - [jsx-a11y/anchor-has-content: `components` option](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-has-content.md#rule-options)
20
+ * - [jsx-a11y/anchor-is-valid: `components` option](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/anchor-is-valid.md#rule-options)
21
+ *
22
+ * @default ['Link', 'NextLink', 'NavLink']
23
+ */
24
+ anchorComponents?: RuleOptions<'jsx-a11y/anchor-has-content'>['components'];
25
+ /**
26
+ * Names of components that render a heading (`<h1>`...`<h6>`) element.
27
+ *
28
+ * New items extend the defaults instead of overriding them.
29
+ *
30
+ * @default ['H1', 'H2', 'H3', 'H4', 'H5', 'H6']
31
+ *
32
+ * @see [jsx-a11y/heading-has-content: `components` option](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/heading-has-content.md#rule-options)
33
+ */
34
+ headingComponents?: RuleOptions<'jsx-a11y/heading-has-content'>['components'];
35
+ /**
36
+ * Names of components that render an `<img>` element.
37
+ *
38
+ * New items extend the defaults instead of overriding them.
39
+ *
40
+ * This is used by
41
+ * - [jsx-a11y/alt-text: `img` option](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/alt-text.md#rule-options)
42
+ * - [jsx-a11y/img-redundant-alt: `components` option](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md#rule-options)
43
+ *
44
+ * @default ['Img', 'LazyImg', 'Image', 'LazyImage', 'NextImage', 'LazyNextImage']
45
+ */
46
+ imageComponents?: RuleOptions<'jsx-a11y/img-redundant-alt'>['components'];
47
+ };
48
+ }
49
+ //#endregion
50
+ export type { ReactOptions };
@@ -97,7 +97,7 @@ interface StylisticOptions extends ConfigWithOverrides<ConfigRules> {
97
97
  *
98
98
  * @default 'always'
99
99
  */
100
- selfCloseVoidHTMLElements?: 'never' | 'always';
100
+ selfCloseVoidHtmlElements?: 'never' | 'always';
101
101
  /**
102
102
  * Add semicolons at the end of statements.
103
103
  *
@@ -44,7 +44,7 @@ interface TestOptions {
44
44
  */
45
45
  storybook?: boolean | ConfigWithOverrides<StorybookConfigRules>;
46
46
  /**
47
- * Use [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
47
+ * Use [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
48
48
  *
49
49
  * @default false // `true` if "vitest" is detected in the dependencies when `autoDetectDeps` is enabled
50
50
  */
@@ -29,7 +29,7 @@ interface TypeScriptOptions extends ConfigWithOverrides<ConfigRules> {
29
29
  *
30
30
  * If set to `false`, unused imports will only be reported.
31
31
  *
32
- * @default true
32
+ * @default false
33
33
  *
34
34
  * @see [@typescript-eslint/no-unused-vars: `enableAutofixRemoval.imports` option](https://typescript-eslint.io/rules/no-unused-vars/#enableautofixremovalimports)
35
35
  */
@@ -65,7 +65,7 @@ interface VueOptions extends ConfigWithOverrides<ConfigRules> {
65
65
  *
66
66
  * @default
67
67
  * {
68
- * script: 'js', // `'ts'` if "typescript" is detected in the dependencies when `autoDetectDeps` is enabled
68
+ * script: 'js', // `'ts'` if TypeScript integration is enabled
69
69
  * style: 'implicit',
70
70
  * }
71
71
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shayanthenerd/eslint-config",
3
- "version": "0.24.1",
3
+ "version": "0.26.0",
4
4
  "description": "A modern, flexible ESLint configuration for enforcing best practices and maintaining a consistent coding style",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,42 +52,47 @@
52
52
  "{**/*.ts,package.json}": "pnpm lint"
53
53
  },
54
54
  "dependencies": {
55
+ "@eslint-react/eslint-plugin": "5.9.2",
55
56
  "@eslint/css": "1.3.0",
56
57
  "@eslint/markdown": "8.0.2",
57
58
  "@html-eslint/eslint-plugin": "0.62.0",
59
+ "@html-eslint/eslint-plugin-react": "0.62.0",
60
+ "@next/eslint-plugin-next": "16.2.9",
58
61
  "@stylistic/eslint-plugin": "5.10.0",
59
62
  "@vitest/eslint-plugin": "1.6.20",
60
- "astro-eslint-parser": "1.4.0",
63
+ "astro-eslint-parser": "2.0.0",
61
64
  "defu": "6.1.7",
62
65
  "eslint-flat-config-utils": "3.2.0",
63
66
  "eslint-import-resolver-typescript": "4.4.5",
64
- "eslint-plugin-astro": "1.7.0",
67
+ "eslint-plugin-astro": "2.1.0",
68
+ "eslint-plugin-baseline-js": "0.6.2",
65
69
  "eslint-plugin-better-tailwindcss": "4.6.0",
66
70
  "eslint-plugin-cypress": "6.4.1",
67
- "eslint-plugin-import-x": "4.16.2",
71
+ "eslint-plugin-import-x": "4.17.0",
68
72
  "eslint-plugin-jsx-a11y": "6.10.2",
69
73
  "eslint-plugin-n": "18.1.0",
70
- "eslint-plugin-package-json": "1.3.0",
71
- "eslint-plugin-perfectionist": "5.9.0",
74
+ "eslint-plugin-package-json": "1.5.0",
75
+ "eslint-plugin-perfectionist": "5.9.1",
72
76
  "eslint-plugin-playwright": "2.10.4",
73
77
  "eslint-plugin-promise": "7.3.0",
74
- "eslint-plugin-storybook": "10.4.4",
75
- "eslint-plugin-unicorn": "65.0.1",
78
+ "eslint-plugin-storybook": "10.4.6",
79
+ "eslint-plugin-unicorn": "68.0.0",
76
80
  "eslint-plugin-vue": "10.9.2",
77
81
  "eslint-plugin-vuejs-accessibility": "2.5.0",
78
82
  "eslint-plugin-zod": "4.7.0",
79
83
  "eslint-plugin-zod-mini": "1.4.0",
80
- "globals": "17.6.0",
84
+ "globals": "17.7.0",
81
85
  "local-pkg": "1.2.1",
82
86
  "tailwind-csstree": "0.3.3",
83
- "typescript-eslint": "8.61.0"
87
+ "typescript-eslint": "8.62.0"
84
88
  },
85
89
  "devDependencies": {
86
- "@arethetypeswrong/cli": "0.18.3",
90
+ "@arethetypeswrong/cli": "0.18.4",
87
91
  "@eslint/config-inspector": "3.0.4",
88
- "@types/node": "25.9.3",
89
- "actions-up": "1.14.2",
90
- "eslint": "10.4.1",
92
+ "@types/eslint-plugin-jsx-a11y": "6.10.1",
93
+ "@types/node": "26.0.0",
94
+ "actions-up": "1.14.3",
95
+ "eslint": "10.5.0",
91
96
  "eslint-typegen": "2.3.1",
92
97
  "nano-staged": "1.0.2",
93
98
  "prettier": "3.8.4",
@@ -95,7 +100,7 @@
95
100
  "serve": "14.2.6",
96
101
  "simple-git-hooks": "2.13.1",
97
102
  "ts-morph": "28.0.0",
98
- "tsdown": "0.22.2",
103
+ "tsdown": "0.22.3",
99
104
  "typescript": "6.0.3",
100
105
  "unplugin-unused": "0.5.7"
101
106
  },
@@ -108,12 +113,12 @@
108
113
  "devEngines": {
109
114
  "runtime": {
110
115
  "name": "node",
111
- "version": "^22.22.2 || ^24.15.0 || ^26.0.0",
116
+ "version": "^22.22.3 || ^24.15.0 || ^26.0.0",
112
117
  "onFail": "warn"
113
118
  },
114
119
  "packageManager": {
115
120
  "name": "pnpm",
116
- "version": "^11.0.0",
121
+ "version": "11.8.0",
117
122
  "onFail": "warn"
118
123
  }
119
124
  },
@@ -1,16 +0,0 @@
1
- import { globs } from "../helpers/globs.mjs";
2
- //#region src/configs/restrictedDefaultExports.ts
3
- function getRestrictedDefaultExports() {
4
- return {
5
- name: "shayanthenerd/restrict-default-exports",
6
- files: [globs.restrictedDefaultExports],
7
- rules: { "no-restricted-exports": ["error", { restrictDefaultExports: {
8
- named: true,
9
- direct: true,
10
- namedFrom: true,
11
- namespaceFrom: true
12
- } }] }
13
- };
14
- }
15
- //#endregion
16
- export { getRestrictedDefaultExports };
@@ -1,27 +0,0 @@
1
- import { PluginRules, RuleOptions } from "../eslintRules.mjs";
2
- import { ConfigWithOverrides } from "../index.mjs";
3
-
4
- //#region src/types/options/css.d.ts
5
- type ConfigRules = PluginRules<'css'>;
6
- interface CSSOptions extends ConfigWithOverrides<ConfigRules> {
7
- /**
8
- * An array of relative font units that are allowed to be used.
9
- *
10
- * @default ['rem', 'em']
11
- *
12
- * @see [css/relative-font-units: `allowUnits` option](https://github.com/eslint/css/blob/main/docs/rules/relative-font-units.md#options)
13
- */
14
- allowedRelativeFontUnits?: RuleOptions<'css/relative-font-units'>['allowUnits'];
15
- /**
16
- * Enforce the use of baseline features.
17
- *
18
- * Aside from `'widely'` and `'newly'`, it can also be set to a numeric baseline year, such as `2025`, to allow features that became baseline newly available that year or earlier.
19
- *
20
- * @default false
21
- *
22
- * @see [css/use-baseline](https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md)
23
- */
24
- useBaseline?: false | RuleOptions<'css/use-baseline'>['available'];
25
- }
26
- //#endregion
27
- export type { CSSOptions };
@@ -1,27 +0,0 @@
1
- import { PluginRules, RuleOptions } from "../eslintRules.mjs";
2
- import { ConfigWithOverrides } from "../index.mjs";
3
-
4
- //#region src/types/options/html.d.ts
5
- type ConfigRules = PluginRules<'@html-eslint'>;
6
- interface HTMLOptions extends ConfigWithOverrides<ConfigRules> {
7
- /**
8
- * Enforce consistent naming convention for `id` attribute values.
9
- *
10
- * @default 'snake_case'
11
- *
12
- * @see [@html-eslint/id-naming-convention](https://html-eslint.org/docs/rules/id-naming-convention)
13
- */
14
- idNamingConvention?: Exclude<RuleOptions<'@html-eslint/id-naming-convention'>, 'regex'>;
15
- /**
16
- * Enforce the use of baseline features.
17
- *
18
- * Aside from `'widely'` and `'newly'`, it can also be set to a numeric baseline year, such as `2025` (minimum is `2000`), to allow features that became baseline newly available that year or earlier.
19
- *
20
- * @default false
21
- *
22
- * @see [@html-eslint/use-baseline](https://html-eslint.org/docs/rules/use-baseline)
23
- */
24
- useBaseline?: false | RuleOptions<'@html-eslint/use-baseline'>['available'];
25
- }
26
- //#endregion
27
- export type { HTMLOptions };
@@ -1,18 +0,0 @@
1
- import { PluginRules, RuleOptions } from "../eslintRules.mjs";
2
- import { ConfigWithOverrides } from "../index.mjs";
3
-
4
- //#region src/types/options/perfectionist.d.ts
5
- type SortTypeOptions = RuleOptions<'perfectionist/sort-imports'>['type'];
6
- type ConfigRules = PluginRules<'perfectionist'>;
7
- interface PerfectionistOptions extends ConfigWithOverrides<ConfigRules> {
8
- /**
9
- * The type of sorting.
10
- *
11
- * @default 'line-length'
12
- *
13
- * @see [Perfectionist Settings: `type` option](https://perfectionist.dev/guide/getting-started#settings)
14
- */
15
- sortType?: Exclude<SortTypeOptions, 'type-import-first'>;
16
- }
17
- //#endregion
18
- export type { PerfectionistOptions };