@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.
- package/LICENSE +1 -1
- package/README.md +209 -190
- package/dist/configs/astro.mjs +34 -0
- package/dist/configs/base.mjs +19 -10
- package/dist/configs/css.mjs +2 -2
- package/dist/configs/cypress.mjs +2 -2
- package/dist/configs/html.mjs +2 -3
- package/dist/configs/importX.mjs +8 -4
- package/dist/configs/oxlintOverrides.mjs +20 -14
- package/dist/configs/perfectionist.mjs +8 -4
- package/dist/configs/playwright.mjs +2 -2
- package/dist/configs/restrictedExports.mjs +1 -1
- package/dist/configs/storybook.mjs +2 -2
- package/dist/configs/stylistic.mjs +8 -4
- package/dist/configs/tailwind.mjs +14 -14
- package/dist/configs/typescript.mjs +8 -4
- package/dist/configs/vitest.mjs +2 -2
- package/dist/configs/vue.mjs +2 -2
- package/dist/configs/vueComponentNames.mjs +1 -1
- package/dist/configs/vueServerComponents.mjs +1 -1
- package/dist/configs/zod.mjs +8 -4
- package/dist/{utils → helpers}/globs.mjs +2 -1
- package/dist/{utils → helpers}/ignores/defaultIgnorePatterns.mjs +3 -1
- package/dist/{utils → helpers}/ignores/getIgnorePatterns.mjs +1 -1
- package/dist/{utils → helpers}/ignores/resolveGitignorePatterns.mjs +1 -1
- package/dist/{utils → helpers}/isPackageDetected.mjs +1 -1
- package/dist/{utils → helpers}/options/defaultOptions.mjs +15 -7
- package/dist/{utils → helpers}/options/enableDetectedConfigs.mjs +2 -3
- package/dist/{utils → helpers}/options/mergeWithDefaults.mjs +4 -5
- package/dist/{utils → helpers}/vue/getRestrictedVueElements.mjs +1 -1
- package/dist/{utils → helpers}/vue/getRestrictedVueInputs.mjs +1 -1
- package/dist/index.mjs +6 -4
- package/dist/oxlint.config.jsonc +120 -206
- package/dist/prettier.config.mjs +1 -1
- package/dist/rules/astro.mjs +61 -0
- package/dist/rules/css.mjs +1 -1
- package/dist/rules/html.mjs +3 -3
- package/dist/rules/importX.mjs +1 -1
- package/dist/rules/javascript.mjs +1 -2
- package/dist/rules/perfectionist.mjs +2 -2
- package/dist/rules/stylistic.mjs +10 -7
- package/dist/rules/tailwind.mjs +4 -4
- package/dist/rules/typescript.mjs +2 -2
- package/dist/rules/vue.mjs +6 -6
- package/dist/rules/vueAccessibility.mjs +1 -1
- package/dist/types/configOptions/base.d.mts +8 -8
- package/dist/types/configOptions/nuxt.d.mts +3 -3
- package/dist/types/configOptions/stylistic.d.mts +0 -15
- package/dist/types/configOptions/test.d.mts +4 -4
- package/dist/types/configOptions/vue.d.mts +1 -1
- package/dist/types/eslint-schema.d.mts +1031 -237
- package/dist/types/index.d.mts +46 -20
- 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
|
-
* -
|
|
22
|
-
* -
|
|
23
|
-
* -
|
|
24
|
-
* -
|
|
25
|
-
* -
|
|
26
|
-
* -
|
|
27
|
-
* -
|
|
28
|
-
* -
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
127
|
+
* script: 'js', // `'ts'` if "typescript" is detected in the dependencies when `autoDetectDeps` is enabled
|
|
128
128
|
* style: 'implicit',
|
|
129
129
|
* }
|
|
130
130
|
*
|