@shayanthenerd/eslint-config 0.14.0 → 0.16.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 (53) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +209 -190
  3. package/dist/configs/astro.mjs +34 -0
  4. package/dist/configs/base.mjs +19 -10
  5. package/dist/configs/css.mjs +2 -2
  6. package/dist/configs/cypress.mjs +2 -2
  7. package/dist/configs/html.mjs +2 -3
  8. package/dist/configs/importX.mjs +8 -4
  9. package/dist/configs/oxlintOverrides.mjs +20 -14
  10. package/dist/configs/perfectionist.mjs +8 -4
  11. package/dist/configs/playwright.mjs +2 -2
  12. package/dist/configs/restrictedExports.mjs +1 -1
  13. package/dist/configs/storybook.mjs +2 -2
  14. package/dist/configs/stylistic.mjs +8 -4
  15. package/dist/configs/tailwind.mjs +14 -14
  16. package/dist/configs/typescript.mjs +8 -4
  17. package/dist/configs/vitest.mjs +2 -2
  18. package/dist/configs/vue.mjs +2 -2
  19. package/dist/configs/vueComponentNames.mjs +1 -1
  20. package/dist/configs/vueServerComponents.mjs +1 -1
  21. package/dist/configs/zod.mjs +8 -4
  22. package/dist/{utils → helpers}/globs.mjs +2 -1
  23. package/dist/{utils → helpers}/ignores/defaultIgnorePatterns.mjs +3 -1
  24. package/dist/{utils → helpers}/ignores/getIgnorePatterns.mjs +1 -1
  25. package/dist/{utils → helpers}/ignores/resolveGitignorePatterns.mjs +1 -1
  26. package/dist/{utils → helpers}/isPackageDetected.mjs +1 -1
  27. package/dist/{utils → helpers}/options/defaultOptions.mjs +15 -7
  28. package/dist/{utils → helpers}/options/enableDetectedConfigs.mjs +2 -3
  29. package/dist/{utils → helpers}/options/mergeWithDefaults.mjs +4 -5
  30. package/dist/{utils → helpers}/vue/getRestrictedVueElements.mjs +1 -1
  31. package/dist/{utils → helpers}/vue/getRestrictedVueInputs.mjs +1 -1
  32. package/dist/index.mjs +6 -4
  33. package/dist/oxlint.config.jsonc +120 -206
  34. package/dist/prettier.config.mjs +1 -1
  35. package/dist/rules/astro.mjs +61 -0
  36. package/dist/rules/css.mjs +1 -1
  37. package/dist/rules/html.mjs +3 -3
  38. package/dist/rules/importX.mjs +1 -1
  39. package/dist/rules/javascript.mjs +1 -2
  40. package/dist/rules/perfectionist.mjs +2 -2
  41. package/dist/rules/stylistic.mjs +10 -7
  42. package/dist/rules/tailwind.mjs +4 -4
  43. package/dist/rules/typescript.mjs +2 -2
  44. package/dist/rules/vue.mjs +6 -6
  45. package/dist/rules/vueAccessibility.mjs +1 -1
  46. package/dist/types/configOptions/base.d.mts +8 -8
  47. package/dist/types/configOptions/nuxt.d.mts +3 -3
  48. package/dist/types/configOptions/stylistic.d.mts +0 -15
  49. package/dist/types/configOptions/test.d.mts +4 -4
  50. package/dist/types/configOptions/vue.d.mts +1 -1
  51. package/dist/types/eslint-schema.d.mts +1031 -237
  52. package/dist/types/index.d.mts +46 -20
  53. package/package.json +142 -124
@@ -18,14 +18,14 @@ interface BaseOptions extends ConfigWithOverrides {
18
18
 
19
19
  /**
20
20
  * Enforce named exports in the following directories:
21
- * - 'shared'
22
- * - 'dto', 'dtos'
23
- * - 'model', 'models'
24
- * - 'helper', 'helpers'
25
- * - 'module', 'modules'
26
- * - 'util', 'utils', 'utilities'
27
- * - 'composable', 'composables'
28
- * - 'repo', 'repos', 'repository', 'repositories'
21
+ * - shared
22
+ * - dto, dtos
23
+ * - model, models
24
+ * - helper, helpers
25
+ * - module, modules
26
+ * - util, utils, utilities
27
+ * - composable, composables
28
+ * - repo, repos, repository, repositories
29
29
  *
30
30
  * @default true
31
31
  *
@@ -5,7 +5,7 @@ interface NuxtOptions {
5
5
  *
6
6
  * Enforce the use of `<NuxtImg>` instead of `<img>`.
7
7
  *
8
- * @default false // `true` if "@nuxt/image" is detected in the package.json file when `autoDetectDeps` is enabled
8
+ * @default false // `true` if "@nuxt/image" is detected in the dependencies when `autoDetectDeps` is enabled
9
9
  *
10
10
  * @see [vue/no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements)
11
11
  */
@@ -16,7 +16,7 @@ interface NuxtOptions {
16
16
  *
17
17
  * Allows ESLint to recognize the icon component.
18
18
  *
19
- * @default false // `true` if "@nuxt/icon" is detected in the package.json file when `autoDetectDeps` is enabled
19
+ * @default false // `true` if "@nuxt/icon" is detected in the dependencies when `autoDetectDeps` is enabled
20
20
  *
21
21
  * @see [vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components)
22
22
  */
@@ -42,7 +42,7 @@ interface NuxtOptions {
42
42
  *
43
43
  * Enforce the use of NuxtUI components over their standard counterparts. For example, `<ULink>` must be used instead of `<a>`, `<UInput>` instead of `<input>`, etc.
44
44
  *
45
- * @default false // `true` if "@nuxt/ui" is detected in the package.json file when `autoDetectDeps` is enabled
45
+ * @default false // `true` if "@nuxt/ui" is detected in the dependencies when `autoDetectDeps` is enabled
46
46
  *
47
47
  * @see [vue/no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements)
48
48
  */
@@ -61,21 +61,6 @@ interface StylisticOptions extends ConfigWithOverrides {
61
61
  */
62
62
  arrowParens?: RuleOptions<'@stylistic/arrow-parens'>;
63
63
 
64
- /**
65
- * Use tabs for indentation.
66
- *
67
- * This is used by
68
- * - [vue/html-indent](https://eslint.vuejs.org/rules/html-indent)
69
- * - [@html-eslint/indent](https://html-eslint.org/docs/rules/indent)
70
- * - [@stylistic/indent](https://eslint.style/rules/indent)
71
- * - [@stylistic/no-tabs](https://eslint.style/rules/no-tabs)
72
- * - [@stylistic/indent-binary-ops](https://eslint.style/rules/indent-binary-ops)
73
- * - [better-tailwindcss/enforce-consistent-line-wrapping](https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/rules/enforce-consistent-line-wrapping.md)
74
- *
75
- * @default true
76
- */
77
- useTabs?: boolean;
78
-
79
64
  /**
80
65
  * The number of space characters used for indentation.
81
66
  *
@@ -6,28 +6,28 @@ interface TestOptions {
6
6
  /**
7
7
  * Use [eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook) to enforce best practices and code styles for Storybook stories and tests.
8
8
  *
9
- * @default false // `true` if "storybook" is detected in the package.json file when `autoDetectDeps` is enabled
9
+ * @default false // `true` if "storybook" is detected in the dependencies when `autoDetectDeps` is enabled
10
10
  */
11
11
  storybook?: boolean | ConfigWithOverrides;
12
12
 
13
13
  /**
14
14
  * Use [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest) to enforce best practices and code styles for Vitest tests.
15
15
  *
16
- * @default false // `true` if "vitest" is detected in the package.json file when `autoDetectDeps` is enabled
16
+ * @default false // `true` if "vitest" is detected in the dependencies when `autoDetectDeps` is enabled
17
17
  */
18
18
  vitest?: boolean | ConfigWithOverrides;
19
19
 
20
20
  /**
21
21
  * Use [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) to enforce best practices and code styles for Playwright tests.
22
22
  *
23
- * @default false // `true` if "@playwright/test" is detected in the package.json file when `autoDetectDeps` is enabled
23
+ * @default false // `true` if "@playwright/test" is detected in the dependencies when `autoDetectDeps` is enabled
24
24
  */
25
25
  playwright?: boolean | ConfigWithOverrides;
26
26
 
27
27
  /**
28
28
  * Use [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) to enforce best practices and code styles for Cypress tests.
29
29
  *
30
- * @default false // `true` if "cypress" is detected in the package.json file when `autoDetectDeps` is enabled
30
+ * @default false // `true` if "cypress" is detected in the dependencies when `autoDetectDeps` is enabled
31
31
  */
32
32
  cypress?: boolean | ConfigWithOverrides;
33
33
 
@@ -124,7 +124,7 @@ interface VueOptions extends ConfigWithOverrides {
124
124
  *
125
125
  * @default
126
126
  * {
127
- * script: 'js', // `'ts'` if "typescript" is detected in the package.json file when `autoDetectDeps` is enabled
127
+ * script: 'js', // `'ts'` if "typescript" is detected in the dependencies when `autoDetectDeps` is enabled
128
128
  * style: 'implicit',
129
129
  * }
130
130
  *