@shayanthenerd/eslint-config 0.11.2 → 0.12.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.
@@ -8,11 +8,14 @@ function getVueRules(options) {
8
8
  const { typescript, stylistic, tailwind, vue, nuxt } = options.configs;
9
9
  const { indent, useTabs, trailingComma, maxLineLength, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHTMLElements } = isEnabled(stylistic) ? stylistic : defaultOptions.configs.stylistic;
10
10
  const { blockLang, blocksOrder, macrosOrder, attributesOrder, destructureProps, vForDelimiterStyle, attributeHyphenation, allowedStyleAttributes, preferVBindTrueShorthand, componentNameCaseInTemplate, preferVBindSameNameShorthand, restrictedElements: userRestrictedElements, ignoredUndefinedComponents: userIgnoredUndefinedComponents, restrictedStaticAttributes: userRestrictedStaticAttributes } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
11
- const nuxtImage = isEnabled(nuxt) ? nuxt.image : void 0;
12
- const nuxtUI = isEnabled(nuxt) ? nuxt.ui : void 0;
13
- const nuxtUIPrefix = isEnabled(nuxt) && isEnabled(nuxt.ui) ? nuxt.ui.prefix : defaultOptions.configs.nuxt.ui.prefix;
14
- const nuxtIcon = isEnabled(nuxt) ? nuxt.icon : void 0;
15
- const nuxtIconComponent = isEnabled(nuxt) && isEnabled(nuxt.icon) ? nuxt.icon.component : defaultOptions.configs.nuxt.icon.component;
11
+ const isNuxtEnabled = isEnabled(nuxt);
12
+ const isNuxtImageEnabled = isNuxtEnabled ? nuxt.image : void 0;
13
+ const isNuxtUIEnabled = isNuxtEnabled ? nuxt.ui : void 0;
14
+ const nuxtUIPrefix = isNuxtEnabled && isEnabled(nuxt.ui) ? nuxt.ui.prefix : defaultOptions.configs.nuxt.ui.prefix;
15
+ const isNuxtIconEnabled = isNuxtEnabled ? nuxt.icon : void 0;
16
+ const nuxtIconComponent = isNuxtEnabled && isEnabled(nuxt.icon) ? nuxt.icon.component : defaultOptions.configs.nuxt.icon.component;
17
+ const restrictedVueElements = isNuxtUIEnabled ? getRestrictedVueElements(nuxtUIPrefix) : [];
18
+ const restrictedVueInputs = isNuxtUIEnabled ? getRestrictedVueInputs(nuxtUIPrefix) : [];
16
19
  const isScriptLangTS = blockLang.script === "ts";
17
20
  const isStyleLangImplicit = blockLang.style === "implicit";
18
21
  return {
@@ -20,77 +23,154 @@ function getVueRules(options) {
20
23
  "no-useless-assignment": "off",
21
24
  "import-x/default": "off",
22
25
  "import-x/no-unresolved": "off",
23
- "vue/no-multiple-template-root": "off",
24
- "vue/comment-directive": ["error", { reportUnusedDisableDirectives: true }],
26
+ "vue/jsx-uses-vars": "error",
27
+ "vue/comment-directive": "error",
28
+ "vue/multi-word-component-names": "error",
29
+ "vue/no-arrow-functions-in-watch": "warn",
25
30
  "vue/no-async-in-computed-properties": ["error", { ignoredObjectNames: ["z"] }],
26
- "vue/require-default-prop": "off",
31
+ "vue/no-child-content": "error",
32
+ "vue/no-computed-properties-in-data": "error",
33
+ "vue/no-deprecated-data-object-declaration": "error",
34
+ "vue/no-deprecated-delete-set": "error",
35
+ "vue/no-deprecated-destroyed-lifecycle": "error",
36
+ "vue/no-deprecated-dollar-listeners-api": "error",
37
+ "vue/no-deprecated-dollar-scopedslots-api": "error",
38
+ "vue/no-deprecated-events-api": "error",
39
+ "vue/no-deprecated-filter": "error",
40
+ "vue/no-deprecated-functional-template": "error",
41
+ "vue/no-deprecated-html-element-is": "error",
42
+ "vue/no-deprecated-inline-template": "error",
43
+ "vue/no-deprecated-model-definition": ["error", { allowVue3Compat: true }],
44
+ "vue/no-deprecated-props-default-this": "error",
45
+ "vue/no-deprecated-router-link-tag-prop": "error",
46
+ "vue/no-deprecated-scope-attribute": "error",
47
+ "vue/no-deprecated-slot-attribute": "error",
48
+ "vue/no-deprecated-slot-scope-attribute": "error",
49
+ "vue/no-deprecated-v-bind-sync": "error",
50
+ "vue/no-deprecated-v-is": "error",
51
+ "vue/no-deprecated-v-on-native-modifier": "error",
52
+ "vue/no-deprecated-v-on-number-modifiers": "error",
53
+ "vue/no-deprecated-vue-config-keycodes": "error",
54
+ "vue/no-dupe-keys": "error",
55
+ "vue/no-dupe-v-else-if": "error",
56
+ "vue/no-duplicate-attributes": "error",
57
+ "vue/no-export-in-script-setup": "error",
58
+ "vue/no-expose-after-await": "error",
59
+ "vue/no-lifecycle-after-await": "error",
60
+ "vue/no-multiple-template-root": "off",
61
+ "vue/no-mutating-props": "error",
62
+ "vue/no-parsing-error": "error",
63
+ "vue/no-ref-as-operand": "error",
64
+ "vue/no-reserved-component-names": "error",
65
+ "vue/no-reserved-keys": "error",
66
+ "vue/no-reserved-props": "error",
67
+ "vue/no-shared-component-data": "error",
68
+ "vue/no-side-effects-in-computed-properties": "error",
69
+ "vue/no-template-key": "error",
70
+ "vue/no-textarea-mustache": "error",
71
+ "vue/no-unused-components": "error",
72
+ "vue/no-unused-vars": "error",
73
+ "vue/no-use-computed-property-like-method": "error",
74
+ "vue/no-use-v-if-with-v-for": "error",
75
+ "vue/no-useless-template-attributes": "error",
76
+ "vue/no-v-for-template-key-on-child": "error",
77
+ "vue/no-v-text-v-html-on-component": "error",
78
+ "vue/no-watch-after-await": "error",
79
+ "vue/prefer-import-from-vue": "error",
80
+ "vue/require-component-is": "error",
81
+ "vue/require-prop-type-constructor": "error",
82
+ "vue/require-render-return": "error",
83
+ "vue/require-slots-as-functions": "error",
84
+ "vue/require-toggle-inside-transition": "error",
85
+ "vue/require-v-for-key": "error",
86
+ "vue/require-valid-default-prop": "error",
87
+ "vue/return-in-computed-property": "error",
88
+ "vue/return-in-emits-validator": "error",
89
+ "vue/use-v-on-exact": "error",
90
+ "vue/valid-attribute-name": "error",
91
+ "vue/valid-define-emits": "error",
92
+ "vue/valid-define-options": "error",
93
+ "vue/valid-define-props": "error",
94
+ "vue/valid-next-tick": "error",
95
+ "vue/valid-template-root": "error",
96
+ "vue/valid-v-bind": "error",
97
+ "vue/valid-v-cloak": "error",
98
+ "vue/valid-v-else-if": "error",
99
+ "vue/valid-v-else": "error",
100
+ "vue/valid-v-for": "error",
101
+ "vue/valid-v-html": "error",
102
+ "vue/valid-v-if": "error",
103
+ "vue/valid-v-is": "error",
104
+ "vue/valid-v-memo": "error",
105
+ "vue/valid-v-model": "error",
106
+ "vue/valid-v-on": "error",
107
+ "vue/valid-v-once": "error",
108
+ "vue/valid-v-pre": "error",
109
+ "vue/valid-v-show": "error",
110
+ "vue/valid-v-slot": "error",
111
+ "vue/valid-v-text": "error",
112
+ "vue/attribute-hyphenation": ["warn", attributeHyphenation],
113
+ "vue/component-definition-name-casing": "warn",
114
+ "vue/first-attribute-linebreak": "warn",
27
115
  "vue/html-closing-bracket-newline": "warn",
28
- "vue/singleline-html-element-content-newline": "off",
116
+ "vue/html-closing-bracket-spacing": "warn",
117
+ "vue/html-end-tags": "warn",
29
118
  "vue/html-indent": ["warn", useTabs ? "tab" : indent],
30
- "vue/v-slot-style": ["warn", { atComponent: "shorthand" }],
31
- "vue/attribute-hyphenation": ["warn", attributeHyphenation],
32
- "vue/v-on-event-hyphenation": [
33
- "warn",
34
- attributeHyphenation,
35
- { autofix: true }
36
- ],
37
- "vue/v-bind-style": [
38
- "warn",
39
- "shorthand",
40
- { sameNameShorthand: preferVBindSameNameShorthand }
41
- ],
119
+ "vue/html-quotes": "warn",
42
120
  "vue/html-self-closing": ["error", { html: {
43
121
  normal: "never",
44
122
  void: selfCloseVoidHTMLElements
45
123
  } }],
46
124
  "vue/max-attributes-per-line": ["warn", { singleline: { max: maxAttributesPerLine } }],
47
- "vue/attributes-order": ["warn", { order: attributesOrder }],
48
- "vue/camelcase": "warn",
49
- "vue/no-root-v-if": "warn",
50
- "vue/require-expose": "error",
51
- "vue/no-unused-refs": "error",
125
+ "vue/multiline-html-element-content-newline": "warn",
126
+ "vue/mustache-interpolation-spacing": "warn",
127
+ "vue/no-multi-spaces": "warn",
128
+ "vue/no-spaces-around-equal-signs-in-attribute": "warn",
129
+ "vue/no-template-shadow": "error",
130
+ "vue/one-component-per-file": "error",
52
131
  "vue/prop-name-casing": "warn",
53
- "vue/slot-name-casing": "warn",
54
- "vue/no-useless-v-bind": "error",
55
- "vue/component-api-style": "error",
56
- "vue/html-button-has-type": "error",
57
- "vue/valid-define-options": "error",
58
- "vue/prefer-define-options": "warn",
59
- "vue/require-emit-validator": "error",
60
- "vue/require-default-export": "error",
61
- "vue/custom-event-name-casing": "warn",
62
- "vue/no-use-v-else-with-v-for": "error",
63
- "vue/no-empty-component-block": "error",
64
- "vue/no-negated-v-if-condition": "warn",
65
- "vue/no-import-compiler-macros": "error",
66
- "vue/require-typed-object-prop": "error",
67
- "vue/require-macro-variable-name": "warn",
68
- "vue/padding-line-between-blocks": "warn",
69
- "vue/match-component-import-name": "error",
70
- "vue/html-comment-content-newline": "warn",
71
- "vue/no-multiple-objects-in-class": "warn",
72
- "vue/prefer-separate-static-class": "warn",
73
- "vue/html-comment-content-spacing": "warn",
74
- "vue/comma-dangle": ["warn", trailingComma],
75
- "vue/component-options-name-casing": "warn",
76
- "vue/no-ref-object-reactivity-loss": "error",
77
- "vue/no-duplicate-attr-inheritance": "error",
78
- "vue/no-this-in-before-route-enter": "error",
79
- "vue/prefer-prop-type-boolean-first": "warn",
80
- "vue/no-setup-props-reactivity-loss": "error",
132
+ "vue/v-bind-style": [
133
+ "warn",
134
+ "shorthand",
135
+ { sameNameShorthand: preferVBindSameNameShorthand }
136
+ ],
137
+ "vue/v-on-event-hyphenation": [
138
+ "warn",
139
+ attributeHyphenation,
140
+ { autofix: true }
141
+ ],
142
+ "vue/v-on-style": "warn",
143
+ "vue/v-slot-style": ["warn", { atComponent: "shorthand" }],
144
+ "vue/attributes-order": ["warn", { order: attributesOrder }],
81
145
  "vue/block-order": ["warn", { order: blocksOrder }],
82
- "vue/v-for-delimiter-style": ["warn", vForDelimiterStyle],
83
- "vue/require-typed-ref": isScriptLangTS ? "error" : "off",
84
- "vue/define-macros-order": ["warn", { order: macrosOrder }],
85
- "vue/html-comment-indent": ["warn", useTabs ? "tab" : indent],
86
- "vue/no-static-inline-styles": ["warn", { allowBinding: true }],
146
+ "vue/no-lone-template": "error",
147
+ "vue/no-multiple-slot-args": "error",
87
148
  "vue/no-required-prop-with-default": ["error", { autofix: true }],
88
- "vue/prefer-true-attribute-shorthand": ["warn", preferVBindTrueShorthand],
89
- "vue/no-deprecated-model-definition": ["error", { allowVue3Compat: true }],
90
- "vue/enforce-style-attribute": ["error", { allow: allowedStyleAttributes }],
91
- "vue/define-props-destructuring": ["warn", { destructure: destructureProps }],
92
- "vue/define-emits-declaration": ["warn", isScriptLangTS ? "type-based" : "runtime"],
93
- "vue/define-props-declaration": ["error", isScriptLangTS ? "type-based" : "runtime"],
149
+ "vue/no-v-html": ["warn", { ignorePattern: "^html" }],
150
+ "vue/order-in-components": "warn",
151
+ "vue/this-in-template": "warn",
152
+ "vue/array-bracket-newline": ["warn", "consistent"],
153
+ "vue/array-bracket-spacing": "warn",
154
+ "vue/arrow-spacing": "warn",
155
+ "vue/block-spacing": "warn",
156
+ "vue/brace-style": [
157
+ "warn",
158
+ "1tbs",
159
+ { allowSingleLine: true }
160
+ ],
161
+ "vue/camelcase": ["warn", {
162
+ properties: "never",
163
+ ignoreImports: true,
164
+ ignoreDestructuring: true
165
+ }],
166
+ "vue/comma-dangle": ["warn", trailingComma],
167
+ "vue/comma-spacing": "warn",
168
+ "vue/comma-style": "warn",
169
+ "vue/dot-notation": "warn",
170
+ "vue/eqeqeq": "error",
171
+ "vue/func-call-spacing": "warn",
172
+ "vue/key-spacing": "warn",
173
+ "vue/keyword-spacing": "warn",
94
174
  "vue/max-len": [tailwind ? "off" : "warn", {
95
175
  tabWidth: indent,
96
176
  code: maxLineLength,
@@ -104,6 +184,51 @@ function getVueRules(options) {
104
184
  ignoreHTMLTextContents: true,
105
185
  ignoreHTMLAttributeValues: true
106
186
  }],
187
+ "vue/multiline-ternary": ["warn", "always-multiline"],
188
+ "vue/no-console": ["warn", { allow: [
189
+ "info",
190
+ "warn",
191
+ "error",
192
+ "table",
193
+ "group",
194
+ "groupEnd",
195
+ "groupCollapsed"
196
+ ] }],
197
+ "vue/no-constant-condition": "warn",
198
+ "vue/no-empty-pattern": "warn",
199
+ "vue/no-implicit-coercion": "warn",
200
+ "vue/no-irregular-whitespace": "warn",
201
+ "vue/no-loss-of-precision": "error",
202
+ "vue/no-sparse-arrays": "error",
203
+ "vue/no-useless-concat": "error",
204
+ "vue/object-curly-newline": ["warn", {
205
+ multiline: true,
206
+ consistent: true
207
+ }],
208
+ "vue/object-curly-spacing": [
209
+ "warn",
210
+ "always",
211
+ { emptyObjects: "never" }
212
+ ],
213
+ "vue/object-property-newline": ["warn", { allowAllPropertiesOnSameLine: true }],
214
+ "vue/object-shorthand": "warn",
215
+ "vue/operator-linebreak": [
216
+ "error",
217
+ "none",
218
+ { overrides: {
219
+ "=": "after",
220
+ "?": "before",
221
+ ":": "before",
222
+ "|": "before",
223
+ "&": "before"
224
+ } }
225
+ ],
226
+ "vue/prefer-template": "warn",
227
+ "vue/quote-props": ["warn", "consistent-as-needed"],
228
+ "vue/space-in-parens": "warn",
229
+ "vue/space-infix-ops": "warn",
230
+ "vue/space-unary-ops": "warn",
231
+ "vue/template-curly-spacing": "warn",
107
232
  "vue/block-lang": ["error", {
108
233
  script: { lang: blockLang.script },
109
234
  style: {
@@ -115,70 +240,120 @@ function getVueRules(options) {
115
240
  singleline: "always",
116
241
  maxEmptyLines: maxConsecutiveEmptyLines ? maxConsecutiveEmptyLines - 1 : 0
117
242
  }],
243
+ "vue/component-api-style": "error",
244
+ "vue/component-name-in-template-casing": [
245
+ "warn",
246
+ componentNameCaseInTemplate,
247
+ {
248
+ ignores: ["/^\\w+(\\.\\w+)+$/"],
249
+ registeredComponentsOnly: false
250
+ }
251
+ ],
252
+ "vue/component-options-name-casing": "warn",
253
+ "vue/custom-event-name-casing": "warn",
254
+ "vue/define-emits-declaration": ["warn", isScriptLangTS ? "type-based" : "runtime"],
255
+ "vue/define-macros-order": ["warn", { order: macrosOrder }],
256
+ "vue/define-props-declaration": ["error", isScriptLangTS ? "type-based" : "runtime"],
257
+ "vue/define-props-destructuring": ["warn", { destructure: destructureProps }],
258
+ "vue/enforce-style-attribute": ["error", { allow: allowedStyleAttributes }],
259
+ "vue/html-button-has-type": "error",
260
+ "vue/html-comment-content-newline": "warn",
261
+ "vue/html-comment-content-spacing": "warn",
262
+ "vue/html-comment-indent": ["warn", useTabs ? "tab" : indent],
263
+ "vue/match-component-file-name": ["error", {
264
+ shouldMatchCase: true,
265
+ extensions: isEnabled(typescript) ? [
266
+ "vue",
267
+ "js",
268
+ "jsx",
269
+ "ts",
270
+ "tsx"
271
+ ] : [
272
+ "vue",
273
+ "js",
274
+ "jsx"
275
+ ]
276
+ }],
277
+ "vue/match-component-import-name": "warn",
278
+ "vue/next-tick-style": "warn",
279
+ "vue/no-duplicate-attr-inheritance": "error",
280
+ "vue/no-duplicate-class-names": "warn",
281
+ "vue/no-empty-component-block": "error",
282
+ "vue/no-import-compiler-macros": "error",
283
+ "vue/no-multiple-objects-in-class": "warn",
284
+ "vue/no-negated-v-if-condition": "warn",
285
+ "vue/no-ref-object-reactivity-loss": "error",
118
286
  "vue/no-restricted-html-elements": [
119
287
  "error",
120
288
  {
121
- element: nuxt ? "time" : "",
289
+ element: isNuxtEnabled ? "time" : "",
122
290
  message: "Use `<NuxtTime>`."
123
291
  },
124
292
  {
125
- element: nuxtImage ? "img" : "",
293
+ element: isNuxtImageEnabled ? "img" : "",
126
294
  message: "Use `<NuxtImg>`."
127
295
  },
128
296
  {
129
- element: nuxtUI ? [
297
+ element: isNuxtUIEnabled ? [
130
298
  "a",
131
299
  "RouterLink",
132
300
  "NuxtLink"
133
301
  ] : "",
134
- message: nuxtUI ? `Use \`<${nuxtUIPrefix}Link>\`.` : void 0
302
+ message: isNuxtUIEnabled ? `Use \`<${nuxtUIPrefix}Link>\`.` : void 0
135
303
  },
136
304
  {
137
- element: ["a", nuxt ? "RouterLink" : ""],
138
- message: `Use \`<${nuxt ? "NuxtLink" : "RouterLink"}>\`.`
305
+ element: ["a", isNuxtEnabled ? "RouterLink" : ""],
306
+ message: `Use \`<${isNuxtEnabled ? "NuxtLink" : "RouterLink"}>\`.`
139
307
  },
140
- ...nuxtUI ? getRestrictedVueElements(nuxtUIPrefix) : [],
308
+ ...restrictedVueElements,
141
309
  ...userRestrictedElements
142
310
  ],
143
311
  "vue/no-restricted-static-attribute": [
144
312
  "error",
145
- ...nuxtUI ? getRestrictedVueInputs(nuxtUIPrefix) : [],
146
- nuxtUI ? {
313
+ ...restrictedVueInputs,
314
+ isNuxtUIEnabled ? {
147
315
  key: "href",
148
316
  element: `${nuxtUIPrefix}Link`,
149
317
  message: "Use `v-bind:to=\"\"`."
150
318
  } : { key: "" },
151
- nuxtUI ? {
319
+ isNuxtUIEnabled ? {
152
320
  key: "href",
153
321
  element: `${nuxtUIPrefix}Button`,
154
322
  message: "Use `v-bind:to=\"\"`."
155
323
  } : { key: " " },
156
324
  ...userRestrictedStaticAttributes
157
325
  ],
326
+ "vue/no-root-v-if": "warn",
327
+ "vue/no-setup-props-reactivity-loss": "error",
328
+ "vue/no-static-inline-styles": ["warn", { allowBinding: true }],
329
+ "vue/no-this-in-before-route-enter": "error",
158
330
  "vue/no-undef-components": ["error", { ignorePatterns: [
159
- nuxt ? "^Nuxt" : void 0,
160
- nuxt ? "^(Html|Head|Title|Base|Meta|Link|Style|Body|NoScript|ClientOnly|DevOnly)$" : void 0,
161
- nuxtIcon ? `^${nuxtIconComponent}$` : void 0,
162
- nuxtUI ? `^${nuxtUIPrefix}` : void 0,
331
+ isNuxtEnabled && "^Nuxt",
332
+ isNuxtEnabled && "^(Html|Head|Title|Base|Meta|Link|Style|Body|NoScript|ClientOnly|DevOnly)$",
333
+ isNuxtIconEnabled && `^${nuxtIconComponent}$`,
334
+ isNuxtUIEnabled && `^${nuxtUIPrefix}`,
163
335
  ...userIgnoredUndefinedComponents
164
336
  ].filter(Boolean) }],
165
- "vue/match-component-file-name": ["error", {
166
- shouldMatchCase: true,
167
- extensions: [
168
- "vue",
169
- "js",
170
- "jsx",
171
- ...typescript ? ["ts", "tsx"] : []
172
- ]
173
- }],
174
- "vue/component-name-in-template-casing": [
175
- "warn",
176
- componentNameCaseInTemplate,
177
- {
178
- ignores: ["/^\\w+(\\.\\w+)+$/"],
179
- registeredComponentsOnly: false
180
- }
181
- ]
337
+ "vue/no-unused-refs": "error",
338
+ "vue/no-unused-emit-declarations": "error",
339
+ "vue/no-use-v-else-with-v-for": "error",
340
+ "vue/no-useless-mustaches": "error",
341
+ "vue/no-useless-v-bind": "error",
342
+ "vue/no-v-text": "error",
343
+ "vue/padding-line-between-blocks": "warn",
344
+ "vue/prefer-define-options": "warn",
345
+ "vue/prefer-prop-type-boolean-first": "warn",
346
+ "vue/prefer-separate-static-class": "warn",
347
+ "vue/prefer-true-attribute-shorthand": ["warn", preferVBindTrueShorthand],
348
+ "vue/prefer-use-template-ref": "warn",
349
+ "vue/require-default-export": "error",
350
+ "vue/require-emit-validator": "error",
351
+ "vue/require-expose": "error",
352
+ "vue/require-macro-variable-name": "warn",
353
+ "vue/require-typed-object-prop": isScriptLangTS ? "error" : "off",
354
+ "vue/require-typed-ref": isScriptLangTS ? "error" : "off",
355
+ "vue/slot-name-casing": "warn",
356
+ "vue/v-for-delimiter-style": ["warn", vForDelimiterStyle]
182
357
  };
183
358
  }
184
359
 
@@ -5,19 +5,22 @@ import { defaultOptions } from "../utils/options/defaultOptions.mjs";
5
5
  function getVueAccessibilityRules(options) {
6
6
  const { vue, nuxt } = options.configs;
7
7
  const { imageComponents: userImageComponents, anchorComponents: userAnchorComponents, accessibleChildComponents: userAccessibleChildComponents } = isEnabled(vue) && isEnabled(vue.accessibility) ? vue.accessibility : defaultOptions.configs.vue.accessibility;
8
- const nuxtUI = isEnabled(nuxt) ? nuxt.ui : void 0;
8
+ const isNuxtUIEnabled = isEnabled(nuxt) ? nuxt.ui : void 0;
9
9
  const nuxtUIPrefix = isEnabled(nuxt) && isEnabled(nuxt.ui) ? nuxt.ui.prefix : defaultOptions.configs.nuxt.ui.prefix;
10
10
  return {
11
- "vuejs-accessibility/click-events-have-key-events": "off",
12
- "vuejs-accessibility/mouse-events-have-key-events": "off",
13
- "vuejs-accessibility/no-aria-hidden-on-focusable": "error",
14
- "vuejs-accessibility/no-role-presentation-on-focusable": "error",
15
11
  "vuejs-accessibility/alt-text": ["error", { img: userImageComponents }],
16
12
  "vuejs-accessibility/anchor-has-content": ["error", {
17
13
  components: userAnchorComponents,
18
14
  accessibleChildren: userAccessibleChildComponents
19
15
  }],
20
- "vuejs-accessibility/form-control-has-label": ["error", { labelComponents: nuxtUI ? [`${nuxtUIPrefix}FormField`] : void 0 }],
16
+ "vuejs-accessibility/aria-props": "error",
17
+ "vuejs-accessibility/aria-role": "error",
18
+ "vuejs-accessibility/aria-unsupported-elements": "error",
19
+ "vuejs-accessibility/click-events-have-key-events": "off",
20
+ "vuejs-accessibility/form-control-has-label": ["error", { labelComponents: isNuxtUIEnabled ? [`${nuxtUIPrefix}FormField`] : void 0 }],
21
+ "vuejs-accessibility/heading-has-content": "error",
22
+ "vuejs-accessibility/iframe-has-title": "error",
23
+ "vuejs-accessibility/interactive-supports-focus": "error",
21
24
  "vuejs-accessibility/label-has-for": ["error", {
22
25
  allowChildren: true,
23
26
  required: { some: ["nesting", "id"] },
@@ -29,7 +32,18 @@ function getVueAccessibilityRules(options) {
29
32
  "textarea",
30
33
  "progress"
31
34
  ]
32
- }]
35
+ }],
36
+ "vuejs-accessibility/media-has-caption": "error",
37
+ "vuejs-accessibility/mouse-events-have-key-events": "off",
38
+ "vuejs-accessibility/no-access-key": "warn",
39
+ "vuejs-accessibility/no-aria-hidden-on-focusable": "error",
40
+ "vuejs-accessibility/no-autofocus": "warn",
41
+ "vuejs-accessibility/no-distracting-elements": "warn",
42
+ "vuejs-accessibility/no-redundant-roles": "warn",
43
+ "vuejs-accessibility/no-role-presentation-on-focusable": "error",
44
+ "vuejs-accessibility/no-static-element-interactions": "error",
45
+ "vuejs-accessibility/role-has-required-aria-props": "error",
46
+ "vuejs-accessibility/tabindex-no-positive": "error"
33
47
  };
34
48
  }
35
49
 
@@ -11,51 +11,26 @@ declare module 'eslint' {
11
11
  // @ts-ignore - In case the package is not installed
12
12
  declare module 'eslint-flat-config-utils' {
13
13
  interface DefaultConfigNamesMap {
14
- 'shayanthenerd/global'?: true;
15
14
  'shayanthenerd/ignores'?: true;
16
- 'shayanthenerd/base > ExtendedConfig[0]'?: true;
15
+ 'shayanthenerd/global'?: true;
17
16
  'shayanthenerd/base'?: true;
18
- 'shayanthenerd/restricted-exports'?: true;
19
- 'shayanthenerd/import-x > import-x/recommended'?: true;
20
- 'shayanthenerd/import-x > import-x/typescript'?: true;
21
- 'shayanthenerd/import-x'?: true;
22
- 'shayanthenerd/stylistic > ExtendedConfig[0]'?: true;
23
- 'shayanthenerd/stylistic'?: true;
24
- 'shayanthenerd/perfectionist'?: true;
25
- 'shayanthenerd/typescript > typescript-eslint/base'?: true;
26
- 'shayanthenerd/typescript > typescript-eslint/eslint-recommended'?: true;
27
- 'shayanthenerd/typescript > typescript-eslint/strict-type-checked'?: true;
28
- 'shayanthenerd/typescript > typescript-eslint/base'?: true;
29
- 'shayanthenerd/typescript > typescript-eslint/eslint-recommended'?: true;
30
- 'shayanthenerd/typescript > typescript-eslint/stylistic-type-checked'?: true;
31
17
  'shayanthenerd/typescript'?: true;
32
- 'shayanthenerd/html > ExtendedConfig[0]'?: true;
33
18
  'shayanthenerd/html'?: true;
34
- 'shayanthenerd/css > ExtendedConfig[0]'?: true;
35
19
  'shayanthenerd/css'?: true;
20
+ 'shayanthenerd/imports'?: true;
21
+ 'shayanthenerd/restricted-exports'?: true;
22
+ 'shayanthenerd/stylistic'?: true;
23
+ 'shayanthenerd/perfectionist'?: true;
36
24
  'shayanthenerd/tailwind'?: true;
37
- 'shayanthenerd/vue > vue/base/setup'?: true;
38
- 'shayanthenerd/vue > vue/base/setup-for-vue'?: true;
39
- 'shayanthenerd/vue > vue/essential/rules'?: true;
40
- 'shayanthenerd/vue > vue/strongly-recommended/rules'?: true;
41
- 'shayanthenerd/vue > vue/recommended/rules'?: true;
42
- 'shayanthenerd/vue > vuejs-accessibility:setup:base'?: true;
43
- 'shayanthenerd/vue > vuejs-accessibility:setup:with-files-rules-and-parser'?: true;
25
+ 'shayanthenerd/vue > setup'?: true;
44
26
  'shayanthenerd/vue'?: true;
45
27
  'shayanthenerd/vue/multi-word-component-names'?: true;
46
28
  'shayanthenerd/vue/server-components'?: true;
47
- 'shayanthenerd/storybook > storybook:recommended:setup'?: true;
48
- 'shayanthenerd/storybook > storybook:recommended:stories-rules'?: true;
49
- 'shayanthenerd/storybook > storybook:recommended:main-rules'?: true;
50
29
  'shayanthenerd/storybook'?: true;
51
- 'shayanthenerd/vitest > vitest/recommended'?: true;
52
30
  'shayanthenerd/vitest'?: true;
53
- 'shayanthenerd/playwright > ExtendedConfig[0]'?: true;
54
- 'shayanthenerd/playwright'?: true;
55
- 'shayanthenerd/cypress > cypress/recommended'?: true;
56
31
  'shayanthenerd/cypress'?: true;
32
+ 'shayanthenerd/playwright'?: true;
57
33
  'oxlint/from-oxlint-config'?: true;
58
- 'oxlint/vue-svelte-exceptions'?: true;
59
34
  'oxlint/from-oxlint-config-override-0'?: true;
60
35
  'shayanthenerd/oxlint/overrides'?: true;
61
36
  }
@@ -1259,6 +1234,11 @@ interface ESLintSchema {
1259
1234
  * @see https://typescript-eslint.io/rules/no-unused-expressions
1260
1235
  */
1261
1236
  '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions>;
1237
+ /**
1238
+ * Disallow unused private class members
1239
+ * @see https://typescript-eslint.io/rules/no-unused-private-class-members
1240
+ */
1241
+ '@typescript-eslint/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
1262
1242
  /**
1263
1243
  * Disallow unused variables
1264
1244
  * @see https://typescript-eslint.io/rules/no-unused-vars
@@ -3895,6 +3875,11 @@ interface ESLintSchema {
3895
3875
  * @see https://eslint.org/docs/latest/rules/vars-on-top
3896
3876
  */
3897
3877
  'vars-on-top'?: Linter.RuleEntry<[]>;
3878
+ /**
3879
+ * enforce using `.each` or `.for` consistently
3880
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-each-for.md
3881
+ */
3882
+ 'vitest/consistent-each-for'?: Linter.RuleEntry<VitestConsistentEachFor>;
3898
3883
  /**
3899
3884
  * require test file pattern
3900
3885
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
@@ -4112,7 +4097,7 @@ interface ESLintSchema {
4112
4097
  */
4113
4098
  'vitest/prefer-each'?: Linter.RuleEntry<[]>;
4114
4099
  /**
4115
- * enforce using the built-in quality matchers
4100
+ * enforce using the built-in equality matchers
4116
4101
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
4117
4102
  */
4118
4103
  'vitest/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
@@ -4221,11 +4206,21 @@ interface ESLintSchema {
4221
4206
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
4222
4207
  */
4223
4208
  'vitest/prefer-vi-mocked'?: Linter.RuleEntry<[]>;
4209
+ /**
4210
+ * ensure that every `expect.poll` call is awaited
4211
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
4212
+ */
4213
+ 'vitest/require-awaited-expect-poll'?: Linter.RuleEntry<[]>;
4224
4214
  /**
4225
4215
  * require setup and teardown to be within a hook
4226
4216
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
4227
4217
  */
4228
4218
  'vitest/require-hook'?: Linter.RuleEntry<VitestRequireHook>;
4219
+ /**
4220
+ * require usage of import in vi.mock()
4221
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
4222
+ */
4223
+ 'vitest/require-import-vi-mock'?: Linter.RuleEntry<[]>;
4229
4224
  /**
4230
4225
  * require local Test Context for concurrent snapshot tests
4231
4226
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
@@ -4726,6 +4721,11 @@ interface ESLintSchema {
4726
4721
  * @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
4727
4722
  */
4728
4723
  'vue/no-duplicate-attributes'?: Linter.RuleEntry<VueNoDuplicateAttributes>;
4724
+ /**
4725
+ * disallow duplication of class names in class attributes
4726
+ * @see https://eslint.vuejs.org/rules/no-duplicate-class-names.html
4727
+ */
4728
+ 'vue/no-duplicate-class-names'?: Linter.RuleEntry<[]>;
4729
4729
  /**
4730
4730
  * disallow the `<template>` `<script>` `<style>` block to be empty
4731
4731
  * @see https://eslint.vuejs.org/rules/no-empty-component-block.html
@@ -5649,6 +5649,8 @@ type HtmlEslintIndent = [] | [("tab" | number)] | [("tab" | number), {
5649
5649
  tagChildrenIndent?: {
5650
5650
  [k: string]: number;
5651
5651
  };
5652
+ ignoreComment?: boolean;
5653
+ templateIndentBase?: ("first" | "templateTag");
5652
5654
  }];
5653
5655
  // ----- @html-eslint/max-element-depth -----
5654
5656
  type HtmlEslintMaxElementDepth = [] | [{
@@ -12365,6 +12367,13 @@ type UseIsnan = [] | [{
12365
12367
  type ValidTypeof = [] | [{
12366
12368
  requireStringLiterals?: boolean;
12367
12369
  }];
12370
+ // ----- vitest/consistent-each-for -----
12371
+ type VitestConsistentEachFor = [] | [{
12372
+ test?: ("each" | "for");
12373
+ it?: ("each" | "for");
12374
+ describe?: ("each" | "for");
12375
+ suite?: ("each" | "for");
12376
+ }];
12368
12377
  // ----- vitest/consistent-test-filename -----
12369
12378
  type VitestConsistentTestFilename = [] | [{
12370
12379
  pattern?: string;
@@ -12398,7 +12407,7 @@ type VitestNoFocusedTests = [] | [{
12398
12407
  }];
12399
12408
  // ----- vitest/no-hooks -----
12400
12409
  type VitestNoHooks = [] | [{
12401
- allow?: unknown[];
12410
+ allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
12402
12411
  }];
12403
12412
  // ----- vitest/no-large-snapshots -----
12404
12413
  type VitestNoLargeSnapshots = [] | [{
@@ -303,7 +303,7 @@ interface Options {
303
303
  *
304
304
  * @default false
305
305
  */
306
- tailwind?: false | (TailwindOptions & ConfigWithOverrides);
306
+ tailwind?: false | TailwindOptions;
307
307
 
308
308
  /**
309
309
  * Use [typescript-eslint](https://typescript-eslint.io) to enforce TypeScript-specific rules.