11module . exports = {
22env : {
33browser : true ,
4+ node : true ,
45} ,
56extends : [
6- 'airbnb-base' ,
77'eslint:recommended' ,
8- 'plugin:vue/recommended' ,
8+ 'plugin:vue/essential' ,
9+ 'plugin:@typescript-eslint/recommended' ,
10+ '@vue/typescript/recommended' ,
11+ 'prettier' ,
12+ './.eslintrc-auto-import.json' ,
913] ,
10- parser : 'vue-eslint-parser' ,
11- parserOptions : {
12- ecmaFeatures : {
13- jsx : true ,
14+ ignorePatterns : [
15+ '.eslintrc.js' ,
16+ 'stylelint.config.js' ,
17+ 'vite.build.config.mts' ,
18+ 'vite.config.mts' ,
19+ 'vitest.config.mts' ,
20+ '*.bk.vue' ,
21+ ] ,
22+ overrides : [
23+ {
24+ files : [
25+ '**/*.spec.{j,t}s?(x)' ,
26+ ] ,
27+ env : {
28+ jest : true ,
29+ } ,
1430} ,
15- ecmaVersion : 12 ,
16- parser : '@babel/eslint-parser' ,
17- requireConfigFile : false ,
18- sourceType : 'module' ,
31+ ] ,
32+ globals : {
33+ Entry : true ,
34+ } ,
35+ parserOptions : {
36+ parser : '@typescript-eslint/parser' ,
1937} ,
2038plugins : [
39+ '@typescript-eslint' ,
2140'import' ,
41+ 'prettier' ,
2242'vue' ,
23- '@babel' ,
2443] ,
44+ root : true ,
2545settings : {
2646'import/resolver' : {
27- 'babel-module' : { } ,
2847} ,
2948} ,
3049rules : {
31- 'arrow-spacing' : [ 'error' , { after : true , before : true } ] ,
50+ '@typescript-eslint/ban-ts-comment' : 0 ,
51+ '@typescript-eslint/ban-types' : [
52+ 'error' ,
53+ {
54+ 'extendDefaults' : true ,
55+ 'types' : {
56+ '{}' : false ,
57+ }
58+ } ,
59+ ] ,
60+ '@typescript-eslint/no-empty-function' : 0 ,
61+ '@typescript-eslint/no-explicit-any' : 0 ,
3262'brace-style' : [ 'error' , 'stroustrup' ] ,
33- 'comma-dangle' : [ 'error' , 'always-multiline' ] ,
3463'default-case' : [
3564'error' , {
3665commentPattern : '^skip\\sdefault' ,
3766} ,
3867] ,
3968'func-names' : [ 'error' , 'never' ] ,
4069'function-paren-newline' : 0 ,
41- 'implicit-arrow-linebreak' : [ 'warn' , 'beside' ] ,
42- 'import/no-extraneous-dependencies' : [
43- 'error' ,
44- {
45- devDependencies : [
46- '**/vite.*.js' ,
47- ] ,
48- } ,
49- ] ,
5070'import/no-self-import' : 0 ,
51- 'import/prefer-default-export' : 0 ,
71+ 'import/no-extraneous-dependencies' : 0 ,
72+ 'implicit-arrow-linebreak' : [ 'warn' , 'beside' ] ,
5273indent : [ 2 , 'tab' , { SwitchCase : 1 } ] ,
74+ 'no-tabs' : [ 0 , { allowIndentationTabs : true } ] ,
5375'linebreak-style' : 0 ,
5476'max-len' : 0 ,
55-
56- 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' ] } ] ,
57- 'no-debugger' : 0 ,
5877'no-else-return' : [ 'error' , { allowElseIf : true } ] ,
59- 'no-multiple-empty-lines' : [ 'error' , { max : 2 , maxEOF : 0 } ] ,
78+ 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' , 'info' , 'trace' ] } ] ,
79+ 'no-const-assign' : 'error' ,
80+ 'no-debugger' : 0 ,
6081'no-new' : 0 ,
82+ 'no-undef' : 0 ,
83+ 'no-unused-vars' : 1 ,
84+ 'no-use-before-define' : 0 ,
85+ 'no-useless-escape' : 0 ,
6186'no-param-reassign' : [
6287'error' , {
63- ignorePropertyModificationsFor : [ 'Vue' , 'field' , 'model' , 'el' , 'item' , 'state' ] ,
6488props : true ,
89+ ignorePropertyModificationsFor : [ 'field' , 'model' , 'el' , 'item' , 'state' , 'Vue' , 'vue' ] ,
6590} ,
6691] ,
67- 'no-plusplus' : [
68- 'error' , { allowForLoopAfterthoughts : true } ,
69- ] ,
70- 'no-tabs' : [ 0 , { allowIndentationTabs : true } ] ,
7192'no-underscore-dangle' : [
7293'error' , {
73- allow : [ '_data' , '__dirname' , '__filename' ] ,
94+ allow : [ '_data' ] ,
7495allowAfterThis : true ,
7596} ,
7697] ,
77- 'no-unused-vars' : 1 ,
78- 'no-useless-escape' : 0 ,
98+ 'no-plusplus' : [
99+ 'error' , { allowForLoopAfterthoughts : true } ,
100+ ] ,
79101'object-curly-newline' : [ 'error' , {
80102ObjectPattern : { multiline : false } ,
81103} ] ,
@@ -89,23 +111,14 @@ module.exports = {
89111enforceForRenamedProperties : false ,
90112} ,
91113] ,
92- quotes : [ 'error' , 'single' , { avoidEscape : true } ] ,
93- semi : [ 'error' , 'always' ] ,
94- 'sort-imports' : [ 'error' , {
95- allowSeparatedGroups : false ,
96- ignoreCase : true ,
97- ignoreDeclarationSort : true ,
98- ignoreMemberSort : false ,
99- memberSyntaxSortOrder : [ 'none' , 'single' , 'all' , 'multiple' ] ,
100- } ] ,
101114'space-before-function-paren' : [ 'error' , {
102115anonymous : 'never' ,
103- asyncArrow : 'never' ,
104116named : 'never' ,
117+ asyncArrow : 'always' ,
105118} ] ,
106119'vue/attributes-order' : [ 'error' , {
107- alphabetical : true ,
108- order : [
120+ ' alphabetical' : true ,
121+ ' order' : [
109122'DEFINITION' ,
110123'LIST_RENDERING' ,
111124'CONDITIONALS' ,
@@ -119,69 +132,22 @@ module.exports = {
119132'CONTENT' ,
120133] ,
121134} ] ,
122- 'vue/component-tags-order' : [ 'error' , {
123- order : [ 'template' , 'script' , 'style' ] ,
124- } ] ,
125135'vue/html-closing-bracket-newline' : 0 ,
126- 'vue/html-comment-content-spacing' : [ 'error' ,
127- 'always' ,
128- ] ,
129136'vue/html-indent' : 0 ,
130137'vue/html-self-closing' : 0 ,
131138'vue/max-attributes-per-line' : 0 ,
132- 'vue/multi-word-component-names ' : 0 ,
139+ 'vue/no-multiple-template-root ' : 0 ,
133140'vue/no-template-shadow' : 0 ,
141+ 'vue/no-v-for-template-key' : 0 ,
134142'vue/no-v-html' : 0 ,
135- 'vue/no-v-text-v-html-on-component' : 0 ,
136- 'vue/order-in-components' : [ 'error' , {
137- order : [
138- 'el' ,
139- 'name' ,
140- 'key' ,
141- 'parent' ,
142- 'functional' ,
143- [ 'delimiters' , 'comments' ] ,
144- [ 'components' , 'directives' , 'filters' ] ,
145- 'extends' ,
146- 'mixins' ,
147- [ 'provide' , 'inject' ] ,
148- 'ROUTER_GUARDS' ,
149- 'layout' ,
150- 'middleware' ,
151- 'validate' ,
152- 'scrollToTop' ,
153- 'transition' ,
154- 'loading' ,
155- 'inheritAttrs' ,
156- 'model' ,
157- [ 'props' , 'propsData' ] ,
158- 'emits' ,
159- 'setup' ,
160- 'asyncData' ,
161- 'data' ,
162- 'fetch' ,
163- 'head' ,
164- 'computed' ,
165- 'watch' ,
166- 'watchQuery' ,
167- 'beforeCreate' ,
168- 'created' ,
169- 'beforeMount' ,
170- 'mounted' ,
171- 'beforeUpdate' ,
172- 'updated' ,
173- 'activated' ,
174- 'deactivated' ,
175- 'beforeDestroy' ,
176- 'destroyed' ,
177- 'errorCaptured' , // for Vue.js 2.5.0+
178- 'methods' ,
179- [ 'template' , 'render' ] ,
180- 'renderError' ,
181- ] ,
182- } ] ,
183- 'vue/padding-line-between-blocks' : 1 ,
184- 'vue/require-name-property' : 1 ,
185143'vue/singleline-html-element-content-newline' : 0 ,
144+ 'vue/sort-keys' : [ 'error' , 'asc' , {
145+ caseSensitive : true ,
146+ ignoreChildrenOf : [ 'model' , 'defineProps' ] ,
147+ ignoreGrandchildrenOf : [ 'computed' , 'directives' , 'inject' , 'props' , 'watch' , 'defineProps' ] ,
148+ minKeys : 2 ,
149+ natural : true ,
150+ } ] ,
151+ 'vue/valid-template-root' : 0 ,
186152} ,
187153} ;
0 commit comments