11module . exports = {
22 env : {
33 browser : true ,
4- node : true ,
54 } ,
65 extends : [
76 'airbnb-base' ,
87 'eslint:recommended' ,
9- 'plugin:vue/essential' ,
10- ] ,
11- globals : {
12- socket : true ,
13- PDFObject : true ,
14- } ,
15- overrides : [
16- {
17- files : [
18- '**/*.spec.{j,t}s?(x)' ,
19- ] ,
20- env : {
21- jest : true ,
22- } ,
23- } ,
8+ 'plugin:vue/recommended' ,
249 ] ,
2510 parser : 'vue-eslint-parser' ,
2611 parserOptions : {
27- parser : '@babel/eslint-parser' ,
12+ ecmaFeatures : {
13+ jsx : true ,
14+ } ,
2815 ecmaVersion : 12 ,
16+ parser : '@babel/eslint-parser' ,
17+ requireConfigFile : false ,
2918 sourceType : 'module' ,
3019 } ,
3120 plugins : [
@@ -39,43 +28,54 @@ module.exports = {
3928 } ,
4029 } ,
4130 rules : {
31+ 'arrow-spacing' : [ 'error' , { after : true , before : true } ] ,
4232 'brace-style' : [ 'error' , 'stroustrup' ] ,
33+ 'comma-dangle' : [ 'error' , 'always-multiline' ] ,
4334 'default-case' : [
4435 'error' , {
4536 commentPattern : '^skip\\sdefault' ,
4637 } ,
4738 ] ,
4839 'func-names' : [ 'error' , 'never' ] ,
4940 'function-paren-newline' : 0 ,
50- 'import/no-self-import' : 0 ,
51- 'import/no-extraneous-dependencies' : 0 ,
5241 'implicit-arrow-linebreak' : [ 'warn' , 'beside' ] ,
42+ 'import/no-extraneous-dependencies' : [
43+ 'error' ,
44+ {
45+ devDependencies : [
46+ '**/vite.*.js' ,
47+ ] ,
48+ } ,
49+ ] ,
50+ 'import/no-self-import' : 0 ,
51+ 'import/prefer-default-export' : 0 ,
5352 indent : [ 2 , 'tab' , { SwitchCase : 1 } ] ,
54- 'no-tabs' : [ 0 , { allowIndentationTabs : true } ] ,
5553 'linebreak-style' : 0 ,
5654 'max-len' : 0 ,
57- 'no-else-return' : [ 'error' , { allowElseIf : true } ] ,
58- 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' , 'info' ] } ] ,
55+
56+ 'no-console' : [ 'warn' , { allow : [ 'warn' , 'error' ] } ] ,
5957 'no-debugger' : 0 ,
58+ 'no-else-return' : [ 'error' , { allowElseIf : true } ] ,
59+ 'no-multiple-empty-lines' : [ 'error' , { max : 2 , maxEOF : 0 } ] ,
6060 'no-new' : 0 ,
61- 'no-unused-vars' : 1 ,
62- 'no-use-before-define' : 0 ,
63- 'no-useless-escape' : 0 ,
6461 'no-param-reassign' : [
6562 'error' , {
63+ ignorePropertyModificationsFor : [ 'Vue' , 'field' , 'model' , 'el' , 'item' , 'state' ] ,
6664 props : true ,
67- ignorePropertyModificationsFor : [ 'field' , 'model' , 'el' , 'item' , 'state' , 'Vue' , 'vue' ] ,
6865 } ,
6966 ] ,
67+ 'no-plusplus' : [
68+ 'error' , { allowForLoopAfterthoughts : true } ,
69+ ] ,
70+ 'no-tabs' : [ 0 , { allowIndentationTabs : true } ] ,
7071 'no-underscore-dangle' : [
7172 'error' , {
72- allow : [ '_data' ] ,
73+ allow : [ '_data' , '__dirname' , '__filename' ] ,
7374 allowAfterThis : true ,
7475 } ,
7576 ] ,
76- 'no-plusplus' : [
77- 'error' , { allowForLoopAfterthoughts : true } ,
78- ] ,
77+ 'no-unused-vars' : 1 ,
78+ 'no-useless-escape' : 0 ,
7979 'object-curly-newline' : [ 'error' , {
8080 ObjectPattern : { multiline : false } ,
8181 } ] ,
@@ -89,17 +89,99 @@ module.exports = {
8989 enforceForRenamedProperties : false ,
9090 } ,
9191 ] ,
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+ } ] ,
92101 'space-before-function-paren' : [ 'error' , {
93102 anonymous : 'never' ,
94- named : 'never' ,
95103 asyncArrow : 'never' ,
104+ named : 'never' ,
105+ } ] ,
106+ 'vue/attributes-order' : [ 'error' , {
107+ alphabetical : true ,
108+ order : [
109+ 'DEFINITION' ,
110+ 'LIST_RENDERING' ,
111+ 'CONDITIONALS' ,
112+ 'RENDER_MODIFIERS' ,
113+ 'GLOBAL' ,
114+ [ 'UNIQUE' , 'SLOT' ] ,
115+ 'TWO_WAY_BINDING' ,
116+ 'OTHER_DIRECTIVES' ,
117+ 'OTHER_ATTR' ,
118+ 'EVENTS' ,
119+ 'CONTENT' ,
120+ ] ,
121+ } ] ,
122+ 'vue/component-tags-order' : [ 'error' , {
123+ order : [ 'template' , 'script' , 'style' ] ,
96124 } ] ,
97125 'vue/html-closing-bracket-newline' : 0 ,
126+ 'vue/html-comment-content-spacing' : [ 'error' ,
127+ 'always' ,
128+ ] ,
98129 'vue/html-indent' : 0 ,
99130 'vue/html-self-closing' : 0 ,
100131 'vue/max-attributes-per-line' : 0 ,
132+ 'vue/multi-word-component-names' : 0 ,
101133 'vue/no-template-shadow' : 0 ,
102134 '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 ,
103185 'vue/singleline-html-element-content-newline' : 0 ,
104186 } ,
105187} ;
0 commit comments