1
1
import { getVueVersion , interopDefault } from '../shared'
2
2
import { GLOB_VUE } from '../constants/glob'
3
- import type {
4
- FlatConfigItem ,
5
- OptionsFiles ,
6
- OptionsHasTypeScript ,
7
- OptionsOverrides ,
8
- } from '../types'
3
+ import type { FlatConfigItem , OptionsFiles , OptionsHasTypeScript , OptionsOverrides } from '../types'
9
4
10
5
export async function vue (
11
6
options : OptionsHasTypeScript & OptionsOverrides & OptionsFiles = { } ,
@@ -49,11 +44,7 @@ export async function vue(
49
44
jsx : true ,
50
45
} ,
51
46
extraFileExtensions : [ '.vue' ] ,
52
- parser : options . typescript
53
- ? ( ( await interopDefault (
54
- import ( '@typescript-eslint/parser' ) ,
55
- ) ) as any )
56
- : null ,
47
+ parser : options . typescript ? ( ( await interopDefault ( import ( '@typescript-eslint/parser' ) ) ) as any ) : null ,
57
48
sourceType : 'module' ,
58
49
} ,
59
50
} ,
@@ -77,32 +68,34 @@ export async function vue(
77
68
'vue/define-macros-order' : [
78
69
'error' ,
79
70
{
80
- order : [
81
- 'defineOptions' ,
82
- 'defineProps' ,
83
- 'defineEmits' ,
84
- 'defineSlots' ,
85
- ] ,
71
+ order : [ 'defineOptions' , 'defineProps' , 'defineEmits' , 'defineSlots' ] ,
86
72
} ,
87
73
] ,
88
74
'vue/dot-location' : [ 'error' , 'property' ] ,
89
75
'vue/dot-notation' : [ 'error' , { allowKeywords : true } ] ,
90
76
'vue/eqeqeq' : [ 'error' , 'smart' ] ,
91
77
'vue/html-indent' : [ 'error' , 2 ] ,
92
78
'vue/html-quotes' : [ 'error' , 'double' ] ,
79
+ 'vue/html-self-closing' : [
80
+ 'error' ,
81
+ {
82
+ html : {
83
+ component : 'always' ,
84
+ normal : 'always' ,
85
+ void : 'any' ,
86
+ } ,
87
+ math : 'always' ,
88
+ svg : 'always' ,
89
+ } ,
90
+ ] ,
93
91
'vue/max-attributes-per-line' : 'off' ,
94
92
'vue/multi-word-component-names' : 'off' ,
95
93
'vue/no-dupe-keys' : 'off' ,
96
94
'vue/no-empty-pattern' : 'error' ,
97
95
'vue/no-extra-parens' : [ 'error' , 'functions' ] ,
98
96
'vue/no-irregular-whitespace' : 'error' ,
99
97
'vue/no-loss-of-precision' : 'error' ,
100
- 'vue/no-restricted-syntax' : [
101
- 'error' ,
102
- 'DebuggerStatement' ,
103
- 'LabeledStatement' ,
104
- 'WithStatement' ,
105
- ] ,
98
+ 'vue/no-restricted-syntax' : [ 'error' , 'DebuggerStatement' , 'LabeledStatement' , 'WithStatement' ] ,
106
99
'vue/no-restricted-v-bind' : [ 'error' , '/^v-/' ] ,
107
100
'vue/no-setup-props-reactivity-loss' : 'off' ,
108
101
'vue/no-sparse-arrays' : 'error' ,
0 commit comments