@@ -22,10 +22,7 @@ export default defineFlatConfig([
22
22
ignores : [
23
23
"node_modules" ,
24
24
"coverage" ,
25
- ".nyc_output" ,
26
25
"dist" ,
27
- ".nuxt" ,
28
- ".output" ,
29
26
"pnpm-lock.yaml" ,
30
27
] ,
31
28
} ,
@@ -43,52 +40,13 @@ export default defineFlatConfig([
43
40
"no-unused-vars" : "off" ,
44
41
} ,
45
42
} ,
46
- // nuxt config eslint
47
- {
48
- files : [ "*.ts" , "*.tsx" , "*.mts" , "*.cts" , "*.vue" ] ,
49
- rules : {
50
- // The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
51
- "@typescript-eslint/no-unused-vars" : "warn" ,
52
- // does not work with type definitions.
53
- "no-unused-vars" : "off" ,
54
- } ,
55
- } ,
56
- {
57
- // Include typescript eslint rules in *.vue files
58
- // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts
59
- files : [ "*.vue" ] ,
60
- rules : {
61
- "constructor-super" : "off" , // ts(2335) & ts(2377)
62
- "getter-return" : "off" , // ts(2378)
63
- "no-const-assign" : "off" , // ts(2588)
64
- "no-dupe-args" : "off" , // ts(2300)
65
- "no-dupe-class-members" : "off" , // ts(2393) & ts(2300)
66
- "no-dupe-keys" : "off" , // ts(1117)
67
- "no-func-assign" : "off" , // ts(2539)
68
- "no-import-assign" : "off" , // ts(2539) & ts(2540)
69
- "no-new-symbol" : "off" , // ts(7009)
70
- "no-obj-calls" : "off" , // ts(2349)
71
- "no-redeclare" : "off" , // ts(2451)
72
- "no-setter-return" : "off" , // ts(2408)
73
- "no-this-before-super" : "off" , // ts(2376)
74
- "no-undef" : "off" , // ts(2304)
75
- "no-unreachable" : "off" , // ts(7027)
76
- "no-unsafe-negation" : "off" , // ts(2365) & ts(2360) & ts(2358)
77
- "no-var" : "warn" , // ts transpile let/const to var, so no need for vars any more
78
- "prefer-const" : "warn" , // ts provides better types with const
79
- "prefer-rest-params" : "warn" , // ts provides better types with rest args over arguments
80
- "prefer-spread" : "warn" , // ts transpile spread to apply, so no need for manual apply
81
- "valid-typeof" : "off" , // ts(2367)
82
- } ,
83
- } ,
84
43
// typescript eslint rules
85
44
{
86
- files : [ "**/*.ts" , "**/*.vue" ] ,
45
+ files : [ "**/*.ts" ] ,
87
46
languageOptions : {
88
47
parser : tsParser ,
89
48
parserOptions : {
90
- extraFileExtensions : [ ".vue" ] ,
91
- project : [ "./tsconfig.json" , "./.nuxt/tsconfig.json" ] ,
49
+ project : "./tsconfig.json" ,
92
50
} ,
93
51
} ,
94
52
plugins : {
@@ -200,119 +158,6 @@ export default defineFlatConfig([
200
158
"@typescript-eslint/unified-signatures" : "warn" ,
201
159
} ,
202
160
} ,
203
- // vue eslint rules
204
- {
205
- files : [ "**/*.vue" ] ,
206
- languageOptions : {
207
- ecmaVersion : 2020 ,
208
- parser : vueParser ,
209
- parserOptions : {
210
- parser : tsParser ,
211
- sourceType : "module" ,
212
- } ,
213
- sourceType : "module" ,
214
- } ,
215
- plugins : { vue } ,
216
- rules : {
217
- "vue/component-api-style" : [ "warn" ] ,
218
- "vue/component-name-in-template-casing" : [ "warn" , "pascal-case" ] ,
219
- "vue/component-options-name-casing" : [ "warn" , "kebab-case" ] ,
220
- "vue/custom-event-name-casing" : [ "warn" , "kebab-case" ] ,
221
- "vue/define-emits-declaration" : [ "warn" , "type-based" ] ,
222
- "vue/define-props-declaration" : [ "warn" , "type-based" ] ,
223
- "vue/multi-word-component-names" : [ "warn" ] ,
224
- "vue/no-arrow-functions-in-watch" : [ "warn" ] ,
225
- "vue/no-async-in-computed-properties" : [ "warn" ] ,
226
- "vue/no-child-content" : [ "warn" ] ,
227
- "vue/no-computed-properties-in-data" : [ "warn" ] ,
228
- "vue/no-deprecated-data-object-declaration" : [ "warn" ] ,
229
- "vue/no-deprecated-destroyed-lifecycle" : [ "warn" ] ,
230
- "vue/no-deprecated-dollar-listeners-api" : [ "warn" ] ,
231
- "vue/no-deprecated-dollar-scopedslots-api" : [ "warn" ] ,
232
- "vue/no-deprecated-events-api" : [ "warn" ] ,
233
- "vue/no-deprecated-filter" : [ "warn" ] ,
234
- "vue/no-deprecated-functional-template" : [ "warn" ] ,
235
- "vue/no-deprecated-html-element-is" : [ "warn" ] ,
236
- "vue/no-deprecated-inline-template" : [ "warn" ] ,
237
- "vue/no-deprecated-props-default-this" : [ "warn" ] ,
238
- "vue/no-deprecated-router-link-tag-prop" : [ "warn" ] ,
239
- "vue/no-deprecated-scope-attribute" : [ "warn" ] ,
240
- "vue/no-deprecated-slot-attribute" : [ "warn" ] ,
241
- "vue/no-deprecated-slot-scope-attribute" : [ "warn" ] ,
242
- "vue/no-deprecated-v-bind-sync" : [ "warn" ] ,
243
- "vue/no-deprecated-v-is" : [ "warn" ] ,
244
- "vue/no-deprecated-v-on-native-modifier" : [ "warn" ] ,
245
- "vue/no-deprecated-v-on-number-modifiers" : [ "warn" ] ,
246
- "vue/no-deprecated-vue-config-keycodes" : [ "warn" ] ,
247
- "vue/no-dupe-keys" : [ "warn" ] ,
248
- "vue/no-dupe-keys" : [ "warn" ] ,
249
- "vue/no-dupe-v-else-if" : [ "warn" ] ,
250
- "vue/no-duplicate-attributes" : [ "warn" ] ,
251
- "vue/no-export-in-script-setup" : [ "warn" ] ,
252
- "vue/no-expose-after-await" : [ "warn" ] ,
253
- "vue/no-lifecycle-after-await" : [ "warn" ] ,
254
- "vue/no-mutating-props" : [ "warn" ] ,
255
- "vue/no-parsing-error" : [ "warn" ] ,
256
- "vue/no-ref-as-operand" : [ "warn" ] ,
257
- "vue/no-required-prop-with-default" : [ "warn" , { autofix : false } ] ,
258
- "vue/no-reserved-component-names" : [ "warn" ] ,
259
- "vue/no-reserved-keys" : [ "warn" ] ,
260
- "vue/no-reserved-props" : [ "warn" ] ,
261
- "vue/no-shared-component-data" : [ "warn" ] ,
262
- "vue/no-side-effects-in-computed-properties" : [ "warn" ] ,
263
- "vue/no-template-key" : [ "warn" ] ,
264
- "vue/no-textarea-mustache" : [ "warn" ] ,
265
- "vue/no-unused-components" : [ "warn" ] ,
266
- "vue/no-unused-vars" : [ "warn" ] ,
267
- "vue/no-use-computed-property-like-method" : [ "warn" ] ,
268
- "vue/no-use-v-if-with-v-for" : [ "warn" ] ,
269
- "vue/no-useless-template-attributes" : [ "warn" ] ,
270
- "vue/no-v-for-template-key-on-child" : [ "warn" ] ,
271
- "vue/no-v-text-v-html-on-component" : [ "warn" ] ,
272
- "vue/no-watch-after-await" : [ "warn" ] ,
273
- "vue/prefer-import-from-vue" : [ "warn" ] ,
274
- "vue/require-component-is" : [ "warn" ] ,
275
- "vue/require-component-is" : [ "warn" ] ,
276
- "vue/require-prop-type-constructor" : [ "warn" ] ,
277
- "vue/require-render-return" : [ "warn" ] ,
278
- "vue/require-slots-as-functions" : [ "warn" ] ,
279
- "vue/require-toggle-inside-transition" : [ "warn" ] ,
280
- "vue/require-v-for-key" : [ "warn" ] ,
281
- "vue/require-valid-default-prop" : [ "warn" ] ,
282
- "vue/return-in-computed-property" : [ "warn" ] ,
283
- "vue/return-in-emits-validator" : [ "warn" ] ,
284
- "vue/script-indent" : [ "warn" , 2 , { baseIndent : 1 } ] ,
285
- "vue/use-v-on-exact" : [ "warn" ] ,
286
- "vue/valid-attribute-name" : [ "warn" ] ,
287
- "vue/valid-define-emits" : [ "warn" ] ,
288
- "vue/valid-define-props" : [ "warn" ] ,
289
- "vue/valid-next-tick" : [ "warn" ] ,
290
- "vue/valid-template-root" : [ "warn" ] ,
291
- "vue/valid-v-bind" : [ "warn" ] ,
292
- "vue/valid-v-cloak" : [ "warn" ] ,
293
- "vue/valid-v-else" : [ "warn" ] ,
294
- "vue/valid-v-else-if" : [ "warn" ] ,
295
- "vue/valid-v-for" : [ "warn" ] ,
296
- "vue/valid-v-html" : [ "warn" ] ,
297
- "vue/valid-v-if" : [ "warn" ] ,
298
- "vue/valid-v-is" : [ "warn" ] ,
299
- "vue/valid-v-memo" : [ "warn" ] ,
300
- "vue/valid-v-model" : [ "warn" ] ,
301
- "vue/valid-v-on" : [ "warn" ] ,
302
- "vue/valid-v-once" : [ "warn" ] ,
303
- "vue/valid-v-pre" : [ "warn" ] ,
304
- "vue/valid-v-show" : [ "warn" ] ,
305
- "vue/valid-v-slot" : [ "warn" ] ,
306
- "vue/valid-v-text" : [ "warn" ] ,
307
- } ,
308
- } ,
309
- // vue component rules
310
- {
311
- files : [ "./components/**/*.vue" ] ,
312
- rules : {
313
- "vue/multi-word-component-names" : "warn" ,
314
- } ,
315
- } ,
316
161
// global rules
317
162
{
318
163
files : [ "**/*" ] ,
@@ -498,31 +343,13 @@ export default defineFlatConfig([
498
343
"write-good-comments/write-good-comments" : "warn" ,
499
344
} ,
500
345
settings : {
501
- "import/ignore" : [ "vue" ] ,
502
346
"import/resolver" : {
503
347
node : {
504
348
extensions : [ ".js" , ".jsx" , ".ts" , ".tsx" ] ,
505
349
} ,
506
350
} ,
507
351
} ,
508
352
} ,
509
- {
510
- files : [
511
- "**/pages/**/*.{js,ts,jsx,tsx,vue}" ,
512
- "**/layouts/**/*.{js,ts,jsx,tsx,vue}" ,
513
- "**/app.{js,ts,jsx,tsx,vue}" ,
514
- "**/error.{js,ts,jsx,tsx,vue}" ,
515
- "**/components/*/**/*.{js,ts,jsx,tsx,vue}" ,
516
- ] ,
517
- rules : { "vue/multi-word-component-names" : "off" } ,
518
- } ,
519
- {
520
- files : [
521
- "**/pages/**/*.{js,ts,jsx,tsx,vue}" ,
522
- "**/layouts/**/*.{js,ts,jsx,tsx,vue}" ,
523
- ] ,
524
- rules : { "vue/no-multiple-template-root" : "error" } ,
525
- } ,
526
353
// this is eslint rules for config files
527
354
{
528
355
files : [
@@ -539,19 +366,6 @@ export default defineFlatConfig([
539
366
"@typescript-eslint/no-magic-numbers" : "off" ,
540
367
"@typescript-eslint/no-unsafe-assignment" : "off" ,
541
368
"@typescript-eslint/no-var-requires" : "off" ,
542
- "perfectionist/sort-array-includes" : "off" ,
543
- "perfectionist/sort-astro-attributes" : "off" ,
544
- "perfectionist/sort-classes" : "off" ,
545
- "perfectionist/sort-enums" : "off" ,
546
- "perfectionist/sort-exports" : "off" ,
547
- "perfectionist/sort-interfaces" : "off" ,
548
- "perfectionist/sort-jsx-props" : "off" ,
549
- "perfectionist/sort-maps" : "off" ,
550
- "perfectionist/sort-named-exports" : "off" ,
551
- "perfectionist/sort-named-imports" : "off" ,
552
- "perfectionist/sort-object-types" : "off" ,
553
- "perfectionist/sort-objects" : "off" ,
554
- "perfectionist/sort-union-types" : "off" ,
555
369
} ,
556
370
} ,
557
371
eslintConfigPrettier ,
0 commit comments