@shayanthenerd/eslint-config 0.1.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 (128) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +496 -0
  3. package/dist/_virtual/rolldown_runtime.cjs +30 -0
  4. package/dist/configs/base.cjs +44 -0
  5. package/dist/configs/base.js +43 -0
  6. package/dist/configs/commons.cjs +26 -0
  7. package/dist/configs/commons.js +25 -0
  8. package/dist/configs/css.cjs +29 -0
  9. package/dist/configs/css.js +28 -0
  10. package/dist/configs/cypress.cjs +23 -0
  11. package/dist/configs/cypress.js +22 -0
  12. package/dist/configs/html.cjs +23 -0
  13. package/dist/configs/html.js +22 -0
  14. package/dist/configs/importX.cjs +26 -0
  15. package/dist/configs/importX.js +25 -0
  16. package/dist/configs/nuxtMultiRootTemplate.cjs +14 -0
  17. package/dist/configs/nuxtMultiRootTemplate.js +14 -0
  18. package/dist/configs/oxlintOverrides.cjs +49 -0
  19. package/dist/configs/oxlintOverrides.js +48 -0
  20. package/dist/configs/perfectionist.cjs +24 -0
  21. package/dist/configs/perfectionist.js +23 -0
  22. package/dist/configs/playwright.cjs +23 -0
  23. package/dist/configs/playwright.js +22 -0
  24. package/dist/configs/storybook.cjs +24 -0
  25. package/dist/configs/storybook.js +23 -0
  26. package/dist/configs/stylistic.cjs +23 -0
  27. package/dist/configs/stylistic.js +22 -0
  28. package/dist/configs/tailwind.cjs +43 -0
  29. package/dist/configs/tailwind.js +42 -0
  30. package/dist/configs/typescript.cjs +31 -0
  31. package/dist/configs/typescript.js +30 -0
  32. package/dist/configs/vitest.cjs +23 -0
  33. package/dist/configs/vitest.js +22 -0
  34. package/dist/configs/vue.cjs +35 -0
  35. package/dist/configs/vue.js +34 -0
  36. package/dist/configs/vueComponentNames.cjs +19 -0
  37. package/dist/configs/vueComponentNames.js +19 -0
  38. package/dist/index.cjs +55 -0
  39. package/dist/index.d.cts +16 -0
  40. package/dist/index.d.ts +16 -0
  41. package/dist/index.js +54 -0
  42. package/dist/oxlint.config.jsonc +192 -0
  43. package/dist/prettier.config.js +42 -0
  44. package/dist/rules/css.cjs +65 -0
  45. package/dist/rules/css.js +65 -0
  46. package/dist/rules/cypress.cjs +16 -0
  47. package/dist/rules/cypress.js +15 -0
  48. package/dist/rules/html.cjs +53 -0
  49. package/dist/rules/html.js +53 -0
  50. package/dist/rules/importX.cjs +51 -0
  51. package/dist/rules/importX.js +50 -0
  52. package/dist/rules/javascript.cjs +164 -0
  53. package/dist/rules/javascript.js +163 -0
  54. package/dist/rules/perfectionist.cjs +73 -0
  55. package/dist/rules/perfectionist.js +73 -0
  56. package/dist/rules/playwright.cjs +28 -0
  57. package/dist/rules/playwright.js +27 -0
  58. package/dist/rules/storybook.cjs +16 -0
  59. package/dist/rules/storybook.js +15 -0
  60. package/dist/rules/stylistic.cjs +160 -0
  61. package/dist/rules/stylistic.js +160 -0
  62. package/dist/rules/tailwind.cjs +36 -0
  63. package/dist/rules/tailwind.js +36 -0
  64. package/dist/rules/typescript.cjs +62 -0
  65. package/dist/rules/typescript.js +62 -0
  66. package/dist/rules/vitest.cjs +47 -0
  67. package/dist/rules/vitest.js +46 -0
  68. package/dist/rules/vue.cjs +169 -0
  69. package/dist/rules/vue.js +169 -0
  70. package/dist/rules/vueAccessibility.cjs +23 -0
  71. package/dist/rules/vueAccessibility.js +23 -0
  72. package/dist/types/configOptions/base.d.cts +47 -0
  73. package/dist/types/configOptions/base.d.ts +47 -0
  74. package/dist/types/configOptions/css.d.cts +27 -0
  75. package/dist/types/configOptions/css.d.ts +27 -0
  76. package/dist/types/configOptions/html.d.cts +27 -0
  77. package/dist/types/configOptions/html.d.ts +27 -0
  78. package/dist/types/configOptions/importX.d.cts +20 -0
  79. package/dist/types/configOptions/importX.d.ts +20 -0
  80. package/dist/types/configOptions/nuxt.d.cts +42 -0
  81. package/dist/types/configOptions/nuxt.d.ts +42 -0
  82. package/dist/types/configOptions/perfectionist.d.cts +16 -0
  83. package/dist/types/configOptions/perfectionist.d.ts +16 -0
  84. package/dist/types/configOptions/stylistic.d.cts +145 -0
  85. package/dist/types/configOptions/stylistic.d.ts +145 -0
  86. package/dist/types/configOptions/tailwind.d.cts +46 -0
  87. package/dist/types/configOptions/tailwind.d.ts +46 -0
  88. package/dist/types/configOptions/test.d.cts +55 -0
  89. package/dist/types/configOptions/test.d.ts +55 -0
  90. package/dist/types/configOptions/typescript.d.cts +36 -0
  91. package/dist/types/configOptions/typescript.d.ts +36 -0
  92. package/dist/types/configOptions/vue.d.cts +211 -0
  93. package/dist/types/configOptions/vue.d.ts +211 -0
  94. package/dist/types/configOptions/vueAccessibility.d.cts +34 -0
  95. package/dist/types/configOptions/vueAccessibility.d.ts +34 -0
  96. package/dist/types/eslint-schema.d.cts +13258 -0
  97. package/dist/types/eslint-schema.d.ts +13258 -0
  98. package/dist/types/eslintRules.d.cts +12 -0
  99. package/dist/types/eslintRules.d.ts +12 -0
  100. package/dist/types/helpers.d.cts +5 -0
  101. package/dist/types/helpers.d.ts +5 -0
  102. package/dist/types/index.d.cts +360 -0
  103. package/dist/types/index.d.ts +360 -0
  104. package/dist/utils/globs.cjs +31 -0
  105. package/dist/utils/globs.js +30 -0
  106. package/dist/utils/ignores/defaultIgnorePatterns.cjs +58 -0
  107. package/dist/utils/ignores/defaultIgnorePatterns.js +57 -0
  108. package/dist/utils/ignores/getIgnorePatterns.cjs +16 -0
  109. package/dist/utils/ignores/getIgnorePatterns.js +16 -0
  110. package/dist/utils/ignores/resolveGitignorePatterns.cjs +27 -0
  111. package/dist/utils/ignores/resolveGitignorePatterns.js +26 -0
  112. package/dist/utils/isEmptyString.cjs +8 -0
  113. package/dist/utils/isEmptyString.js +7 -0
  114. package/dist/utils/isEnabled.cjs +8 -0
  115. package/dist/utils/isEnabled.js +7 -0
  116. package/dist/utils/isPackageDetected.cjs +22 -0
  117. package/dist/utils/isPackageDetected.js +20 -0
  118. package/dist/utils/options/defaultOptions.cjs +168 -0
  119. package/dist/utils/options/defaultOptions.js +167 -0
  120. package/dist/utils/options/enableDetectedConfigs.cjs +36 -0
  121. package/dist/utils/options/enableDetectedConfigs.js +36 -0
  122. package/dist/utils/options/mergeWithDefaults.cjs +22 -0
  123. package/dist/utils/options/mergeWithDefaults.js +21 -0
  124. package/dist/utils/vue/getRestrictedVueElements.cjs +28 -0
  125. package/dist/utils/vue/getRestrictedVueElements.js +27 -0
  126. package/dist/utils/vue/getRestrictedVueInputs.cjs +24 -0
  127. package/dist/utils/vue/getRestrictedVueInputs.js +23 -0
  128. package/package.json +130 -0
@@ -0,0 +1,211 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+ import { VueAccessibilityOptions } from "./vueAccessibility.cjs";
3
+ import { ConfigWithOverrides } from "../index.cjs";
4
+
5
+ //#region src/types/configOptions/vue.d.ts
6
+ interface BlockLang {
7
+ style?: 'css' | 'scss' | 'postcss' | 'implicit';
8
+ script?: 'js' | 'ts' | 'jsx' | 'tsx' | 'implicit';
9
+ }
10
+ type Macro = 'definePage' | 'defineModel' | 'defineProps' | 'defineEmits' | 'defineSlots' | 'defineCustom' | 'defineExpose' | 'defineOptions';
11
+ type SFCBlock = 'docs' | 'template' | 'script[setup]' | 'style[scoped]' | 'i18n[locale=en]' | 'script:not([setup])' | 'style:not([scoped])' | 'i18n:not([locale=en])';
12
+ type VBindStyleSameNameShorthandOptions = RuleOptions<'vue/v-bind-style', 1>['sameNameShorthand'];
13
+ interface VueOptions extends ConfigWithOverrides {
14
+ /**
15
+ * Use [eslint-plugin-vuejs-accessibility](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility) to enforce accessibility standards in SFCs.
16
+ *
17
+ * @default true
18
+ */
19
+ accessibility?: boolean | VueAccessibilityOptions;
20
+
21
+ /**
22
+ * The order of top-level blocks in SFCs.
23
+ *
24
+ * @default
25
+ * [
26
+ * 'script:not([setup])',
27
+ * 'script[setup]',
28
+ * 'template',
29
+ * 'i18n[locale=en]',
30
+ * 'i18n:not([locale=en])',
31
+ * 'style:not([scoped])',
32
+ * 'style[scoped]',
33
+ * 'docs',
34
+ * ]
35
+ *
36
+ * @see [vue/block-order](https://eslint.vuejs.org/rules/block-order)
37
+ */
38
+ blocksOrder?: SFCBlock[];
39
+
40
+ /**
41
+ * The order of compiler macros in `<script setup>`.
42
+ *
43
+ * @default
44
+ * [
45
+ * 'definePage',
46
+ * 'defineOptions',
47
+ * 'defineModel',
48
+ * 'defineProps',
49
+ * 'defineEmits',
50
+ * 'defineSlots',
51
+ * 'defineCustom',
52
+ * 'defineExpose',
53
+ * ]
54
+ *
55
+ * @see [vue/define-macros-order](https://eslint.vuejs.org/rules/define-macros-order)
56
+ */
57
+ macrosOrder?: Macro[];
58
+
59
+ /**
60
+ * The order of HTML and Vue attributes.
61
+ *
62
+ * @default
63
+ * [
64
+ * 'DEFINITION',
65
+ * 'CONDITIONALS',
66
+ * 'RENDER_MODIFIERS',
67
+ * 'LIST_RENDERING',
68
+ * 'UNIQUE',
69
+ * 'GLOBAL',
70
+ * 'TWO_WAY_BINDING',
71
+ * 'SLOT',
72
+ * 'CONTENT',
73
+ * 'OTHER_DIRECTIVES',
74
+ * 'EVENTS',
75
+ * 'ATTR_SHORTHAND_BOOL',
76
+ * 'ATTR_DYNAMIC',
77
+ * 'ATTR_STATIC',
78
+ * ]
79
+ *
80
+ * @see [vue/attributes-order](https://eslint.vuejs.org/rules/attributes-order)
81
+ */
82
+ attributesOrder?: RuleOptions<'vue/attributes-order'>['order'];
83
+
84
+ /**
85
+ * Whether attributes should be hyphenated.
86
+ *
87
+ * @default 'never'
88
+ *
89
+ * @see [vue/attribute-hyphenation](https://eslint.vuejs.org/rules/attribute-hyphenation)
90
+ */
91
+ attributeHyphenation?: RuleOptions<'vue/attribute-hyphenation'>;
92
+
93
+ /**
94
+ * Enforce consistent use of the `v-bind` same-name shorthand style.
95
+ *
96
+ * @default 'always'
97
+ *
98
+ * @see [vue/v-bind-style: `sameNameShorthand` option](https://eslint.vuejs.org/rules/v-bind-style#options)
99
+ */
100
+ preferVBindSameNameShorthand?: Exclude<VBindStyleSameNameShorthandOptions, 'ignore'>;
101
+
102
+ /**
103
+ * Require the shorthand form of the attribute when `v-bind`'s value is `true`.
104
+ *
105
+ * @default 'always'
106
+ *
107
+ * @see [vue/prefer-true-attribute-shorthand](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand)
108
+ */
109
+ preferVBindTrueShorthand?: RuleOptions<'vue/prefer-true-attribute-shorthand'>;
110
+
111
+ /**
112
+ * Enforce the use of specific attributes such as `scoped` and `module` on top-level `<style>` blocks.
113
+ *
114
+ * @default ['scoped', 'module']
115
+ *
116
+ * @see [vue/enforce-style-attribute: `allow` option](https://eslint.vuejs.org/rules/enforce-style-attribute#options)
117
+ */
118
+ allowedStyleAttributes?: RuleOptions<'vue/enforce-style-attribute'>['allow'];
119
+
120
+ /**
121
+ * The language for top-lever SFC blocks.
122
+ *
123
+ * Use `implicit` to omit the `lang` attribute, which defaults to `css` for `<style>`, and `js` for `<script>`.
124
+ *
125
+ * @default
126
+ * {
127
+ * script: 'js', // `'ts'` if "typescript" is detected in the package.json file when `autoDetectDeps` is enabled
128
+ * style: 'implicit',
129
+ * }
130
+ *
131
+ * @see [vue/block-lang](https://eslint.vuejs.org/rules/block-lang)
132
+ */
133
+ blockLang?: BlockLang;
134
+
135
+ /**
136
+ * Enforce a consistent style for destructuring props.
137
+ *
138
+ * @default 'always'
139
+ *
140
+ * @see [vue/define-props-destructuring: `destructure` option](https://eslint.vuejs.org/rules/define-props-destructuring#options)
141
+ */
142
+ destructureProps?: RuleOptions<'vue/define-props-destructuring'>['destructure'];
143
+
144
+ /**
145
+ * Enforce consistent casing for component names in `<template>` blocks.
146
+ *
147
+ * @default 'PascalCase'
148
+ *
149
+ * @see [vue/component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing)
150
+ */
151
+ componentNameCaseInTemplate?: RuleOptions<'vue/component-name-in-template-casing'>;
152
+
153
+ /**
154
+ * The delimiter used in `v-for` directives.
155
+ *
156
+ * @default 'in'
157
+ *
158
+ * @see [vue/v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style)
159
+ */
160
+ vForDelimiterStyle?: RuleOptions<'vue/v-for-delimiter-style'>;
161
+
162
+ /**
163
+ * Enforce a consistent handler style in `v-on` directives.
164
+ *
165
+ * @default ['method', 'inline-function']
166
+ *
167
+ * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
168
+ */
169
+ vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>;
170
+
171
+ /**
172
+ * Disallow certain elements and components.
173
+ *
174
+ * When NuxtUI or NuxtImage are enabled, certain HTML elements (e.g., `<img>`, `<a>`, `<form>`, `<input>`) are disallowed in favor of their alternative components.
175
+ *
176
+ * New items extend the defaults, they don't override it.
177
+ *
178
+ * @default []
179
+ *
180
+ * @see [vue/no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements)
181
+ */
182
+ restrictedElements?: RuleOptions<'vue/no-restricted-html-elements'>[];
183
+
184
+ /**
185
+ * Disallow certain static attributes.
186
+ *
187
+ * @default []
188
+ *
189
+ * @see [vue/no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute)
190
+ */
191
+ restrictedStaticAttributes?: RuleOptions<'vue/no-restricted-static-attribute'>[];
192
+
193
+ /**
194
+ * Regex patterns of undefined component names that should be ignored.
195
+ *
196
+ * This is useful for ignoring components that are globally registered or defined in a way that ESLint cannot detect.
197
+ *
198
+ * New items extend the defaults, they don't override it.
199
+ *
200
+ * @default
201
+ * [
202
+ * '^(Nuxt|U)',
203
+ * '^(Icon|Html|Head|Title|Base|Meta|Link|Style|Body|NoScript)$',
204
+ * ]
205
+ *
206
+ * @see [vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components)
207
+ */
208
+ ignoredUndefinedComponents?: string[];
209
+ }
210
+ //#endregion
211
+ export { type VueOptions };
@@ -0,0 +1,211 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+ import { VueAccessibilityOptions } from "./vueAccessibility.js";
3
+ import { ConfigWithOverrides } from "../index.js";
4
+
5
+ //#region src/types/configOptions/vue.d.ts
6
+ interface BlockLang {
7
+ style?: 'css' | 'scss' | 'postcss' | 'implicit';
8
+ script?: 'js' | 'ts' | 'jsx' | 'tsx' | 'implicit';
9
+ }
10
+ type Macro = 'definePage' | 'defineModel' | 'defineProps' | 'defineEmits' | 'defineSlots' | 'defineCustom' | 'defineExpose' | 'defineOptions';
11
+ type SFCBlock = 'docs' | 'template' | 'script[setup]' | 'style[scoped]' | 'i18n[locale=en]' | 'script:not([setup])' | 'style:not([scoped])' | 'i18n:not([locale=en])';
12
+ type VBindStyleSameNameShorthandOptions = RuleOptions<'vue/v-bind-style', 1>['sameNameShorthand'];
13
+ interface VueOptions extends ConfigWithOverrides {
14
+ /**
15
+ * Use [eslint-plugin-vuejs-accessibility](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility) to enforce accessibility standards in SFCs.
16
+ *
17
+ * @default true
18
+ */
19
+ accessibility?: boolean | VueAccessibilityOptions;
20
+
21
+ /**
22
+ * The order of top-level blocks in SFCs.
23
+ *
24
+ * @default
25
+ * [
26
+ * 'script:not([setup])',
27
+ * 'script[setup]',
28
+ * 'template',
29
+ * 'i18n[locale=en]',
30
+ * 'i18n:not([locale=en])',
31
+ * 'style:not([scoped])',
32
+ * 'style[scoped]',
33
+ * 'docs',
34
+ * ]
35
+ *
36
+ * @see [vue/block-order](https://eslint.vuejs.org/rules/block-order)
37
+ */
38
+ blocksOrder?: SFCBlock[];
39
+
40
+ /**
41
+ * The order of compiler macros in `<script setup>`.
42
+ *
43
+ * @default
44
+ * [
45
+ * 'definePage',
46
+ * 'defineOptions',
47
+ * 'defineModel',
48
+ * 'defineProps',
49
+ * 'defineEmits',
50
+ * 'defineSlots',
51
+ * 'defineCustom',
52
+ * 'defineExpose',
53
+ * ]
54
+ *
55
+ * @see [vue/define-macros-order](https://eslint.vuejs.org/rules/define-macros-order)
56
+ */
57
+ macrosOrder?: Macro[];
58
+
59
+ /**
60
+ * The order of HTML and Vue attributes.
61
+ *
62
+ * @default
63
+ * [
64
+ * 'DEFINITION',
65
+ * 'CONDITIONALS',
66
+ * 'RENDER_MODIFIERS',
67
+ * 'LIST_RENDERING',
68
+ * 'UNIQUE',
69
+ * 'GLOBAL',
70
+ * 'TWO_WAY_BINDING',
71
+ * 'SLOT',
72
+ * 'CONTENT',
73
+ * 'OTHER_DIRECTIVES',
74
+ * 'EVENTS',
75
+ * 'ATTR_SHORTHAND_BOOL',
76
+ * 'ATTR_DYNAMIC',
77
+ * 'ATTR_STATIC',
78
+ * ]
79
+ *
80
+ * @see [vue/attributes-order](https://eslint.vuejs.org/rules/attributes-order)
81
+ */
82
+ attributesOrder?: RuleOptions<'vue/attributes-order'>['order'];
83
+
84
+ /**
85
+ * Whether attributes should be hyphenated.
86
+ *
87
+ * @default 'never'
88
+ *
89
+ * @see [vue/attribute-hyphenation](https://eslint.vuejs.org/rules/attribute-hyphenation)
90
+ */
91
+ attributeHyphenation?: RuleOptions<'vue/attribute-hyphenation'>;
92
+
93
+ /**
94
+ * Enforce consistent use of the `v-bind` same-name shorthand style.
95
+ *
96
+ * @default 'always'
97
+ *
98
+ * @see [vue/v-bind-style: `sameNameShorthand` option](https://eslint.vuejs.org/rules/v-bind-style#options)
99
+ */
100
+ preferVBindSameNameShorthand?: Exclude<VBindStyleSameNameShorthandOptions, 'ignore'>;
101
+
102
+ /**
103
+ * Require the shorthand form of the attribute when `v-bind`'s value is `true`.
104
+ *
105
+ * @default 'always'
106
+ *
107
+ * @see [vue/prefer-true-attribute-shorthand](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand)
108
+ */
109
+ preferVBindTrueShorthand?: RuleOptions<'vue/prefer-true-attribute-shorthand'>;
110
+
111
+ /**
112
+ * Enforce the use of specific attributes such as `scoped` and `module` on top-level `<style>` blocks.
113
+ *
114
+ * @default ['scoped', 'module']
115
+ *
116
+ * @see [vue/enforce-style-attribute: `allow` option](https://eslint.vuejs.org/rules/enforce-style-attribute#options)
117
+ */
118
+ allowedStyleAttributes?: RuleOptions<'vue/enforce-style-attribute'>['allow'];
119
+
120
+ /**
121
+ * The language for top-lever SFC blocks.
122
+ *
123
+ * Use `implicit` to omit the `lang` attribute, which defaults to `css` for `<style>`, and `js` for `<script>`.
124
+ *
125
+ * @default
126
+ * {
127
+ * script: 'js', // `'ts'` if "typescript" is detected in the package.json file when `autoDetectDeps` is enabled
128
+ * style: 'implicit',
129
+ * }
130
+ *
131
+ * @see [vue/block-lang](https://eslint.vuejs.org/rules/block-lang)
132
+ */
133
+ blockLang?: BlockLang;
134
+
135
+ /**
136
+ * Enforce a consistent style for destructuring props.
137
+ *
138
+ * @default 'always'
139
+ *
140
+ * @see [vue/define-props-destructuring: `destructure` option](https://eslint.vuejs.org/rules/define-props-destructuring#options)
141
+ */
142
+ destructureProps?: RuleOptions<'vue/define-props-destructuring'>['destructure'];
143
+
144
+ /**
145
+ * Enforce consistent casing for component names in `<template>` blocks.
146
+ *
147
+ * @default 'PascalCase'
148
+ *
149
+ * @see [vue/component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing)
150
+ */
151
+ componentNameCaseInTemplate?: RuleOptions<'vue/component-name-in-template-casing'>;
152
+
153
+ /**
154
+ * The delimiter used in `v-for` directives.
155
+ *
156
+ * @default 'in'
157
+ *
158
+ * @see [vue/v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style)
159
+ */
160
+ vForDelimiterStyle?: RuleOptions<'vue/v-for-delimiter-style'>;
161
+
162
+ /**
163
+ * Enforce a consistent handler style in `v-on` directives.
164
+ *
165
+ * @default ['method', 'inline-function']
166
+ *
167
+ * @see [vue/v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style)
168
+ */
169
+ vOnHandlerStyle?: RuleOptions<'vue/v-on-handler-style'>;
170
+
171
+ /**
172
+ * Disallow certain elements and components.
173
+ *
174
+ * When NuxtUI or NuxtImage are enabled, certain HTML elements (e.g., `<img>`, `<a>`, `<form>`, `<input>`) are disallowed in favor of their alternative components.
175
+ *
176
+ * New items extend the defaults, they don't override it.
177
+ *
178
+ * @default []
179
+ *
180
+ * @see [vue/no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements)
181
+ */
182
+ restrictedElements?: RuleOptions<'vue/no-restricted-html-elements'>[];
183
+
184
+ /**
185
+ * Disallow certain static attributes.
186
+ *
187
+ * @default []
188
+ *
189
+ * @see [vue/no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute)
190
+ */
191
+ restrictedStaticAttributes?: RuleOptions<'vue/no-restricted-static-attribute'>[];
192
+
193
+ /**
194
+ * Regex patterns of undefined component names that should be ignored.
195
+ *
196
+ * This is useful for ignoring components that are globally registered or defined in a way that ESLint cannot detect.
197
+ *
198
+ * New items extend the defaults, they don't override it.
199
+ *
200
+ * @default
201
+ * [
202
+ * '^(Nuxt|U)',
203
+ * '^(Icon|Html|Head|Title|Base|Meta|Link|Style|Body|NoScript)$',
204
+ * ]
205
+ *
206
+ * @see [vue/no-undef-components](https://eslint.vuejs.org/rules/no-undef-components)
207
+ */
208
+ ignoredUndefinedComponents?: string[];
209
+ }
210
+ //#endregion
211
+ export { type VueOptions };
@@ -0,0 +1,34 @@
1
+ import { RuleOptions } from "../eslintRules.cjs";
2
+
3
+ //#region src/types/configOptions/vueAccessibility.d.ts
4
+ type AnchorHasContentRuleOptions = RuleOptions<'vuejs-accessibility/anchor-has-content'>;
5
+ interface VueAccessibilityOptions {
6
+ /**
7
+ * Names of components that render an `<a>` element.
8
+ *
9
+ * @default ['RouterLink', 'NuxtLink', 'ULink']
10
+ *
11
+ * @see [vuejs-accessibility/anchor-has-content: `components` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content#%F0%9F%94%A7-options)
12
+ */
13
+ anchorComponents?: AnchorHasContentRuleOptions['components'];
14
+
15
+ /**
16
+ * Names of components that render an `<img>` element.
17
+ *
18
+ * @default ['NuxtImg']
19
+ *
20
+ * @see [vuejs-accessibility/alt-text: `img` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/alt-text#%F0%9F%94%A7-options)
21
+ */
22
+ imageComponents?: RuleOptions<'vuejs-accessibility/alt-text'>['img'];
23
+
24
+ /**
25
+ * Names of components that should be considered accessible child elements.
26
+ *
27
+ * @default ['img', 'picture', 'NuxtImg', 'NuxtPicture']
28
+ *
29
+ * @see [vuejs-accessibility/anchor-has-content: `accessibleChildren` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content#%F0%9F%94%A7-options)
30
+ */
31
+ accessibleChildComponents?: AnchorHasContentRuleOptions['accessibleChildren'];
32
+ }
33
+ //#endregion
34
+ export { type VueAccessibilityOptions };
@@ -0,0 +1,34 @@
1
+ import { RuleOptions } from "../eslintRules.js";
2
+
3
+ //#region src/types/configOptions/vueAccessibility.d.ts
4
+ type AnchorHasContentRuleOptions = RuleOptions<'vuejs-accessibility/anchor-has-content'>;
5
+ interface VueAccessibilityOptions {
6
+ /**
7
+ * Names of components that render an `<a>` element.
8
+ *
9
+ * @default ['RouterLink', 'NuxtLink', 'ULink']
10
+ *
11
+ * @see [vuejs-accessibility/anchor-has-content: `components` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content#%F0%9F%94%A7-options)
12
+ */
13
+ anchorComponents?: AnchorHasContentRuleOptions['components'];
14
+
15
+ /**
16
+ * Names of components that render an `<img>` element.
17
+ *
18
+ * @default ['NuxtImg']
19
+ *
20
+ * @see [vuejs-accessibility/alt-text: `img` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/alt-text#%F0%9F%94%A7-options)
21
+ */
22
+ imageComponents?: RuleOptions<'vuejs-accessibility/alt-text'>['img'];
23
+
24
+ /**
25
+ * Names of components that should be considered accessible child elements.
26
+ *
27
+ * @default ['img', 'picture', 'NuxtImg', 'NuxtPicture']
28
+ *
29
+ * @see [vuejs-accessibility/anchor-has-content: `accessibleChildren` option](https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/rules/anchor-has-content#%F0%9F%94%A7-options)
30
+ */
31
+ accessibleChildComponents?: AnchorHasContentRuleOptions['accessibleChildren'];
32
+ }
33
+ //#endregion
34
+ export { type VueAccessibilityOptions };