11import { getVueVersion , interopDefault } from '../shared'
22import { 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'
94
105export async function vue (
116 options : OptionsHasTypeScript & OptionsOverrides & OptionsFiles = { } ,
@@ -49,11 +44,7 @@ export async function vue(
4944 jsx : true ,
5045 } ,
5146 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 ,
5748 sourceType : 'module' ,
5849 } ,
5950 } ,
@@ -77,32 +68,34 @@ export async function vue(
7768 'vue/define-macros-order' : [
7869 'error' ,
7970 {
80- order : [
81- 'defineOptions' ,
82- 'defineProps' ,
83- 'defineEmits' ,
84- 'defineSlots' ,
85- ] ,
71+ order : [ 'defineOptions' , 'defineProps' , 'defineEmits' , 'defineSlots' ] ,
8672 } ,
8773 ] ,
8874 'vue/dot-location' : [ 'error' , 'property' ] ,
8975 'vue/dot-notation' : [ 'error' , { allowKeywords : true } ] ,
9076 'vue/eqeqeq' : [ 'error' , 'smart' ] ,
9177 'vue/html-indent' : [ 'error' , 2 ] ,
9278 '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+ ] ,
9391 'vue/max-attributes-per-line' : 'off' ,
9492 'vue/multi-word-component-names' : 'off' ,
9593 'vue/no-dupe-keys' : 'off' ,
9694 'vue/no-empty-pattern' : 'error' ,
9795 'vue/no-extra-parens' : [ 'error' , 'functions' ] ,
9896 'vue/no-irregular-whitespace' : 'error' ,
9997 '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' ] ,
10699 'vue/no-restricted-v-bind' : [ 'error' , '/^v-/' ] ,
107100 'vue/no-setup-props-reactivity-loss' : 'off' ,
108101 'vue/no-sparse-arrays' : 'error' ,
0 commit comments