11module . exports = {
2- ignorePatterns : [
3- "test/*.js" ,
4- "server/modules/*" ,
5- "src/util.js"
6- ] ,
2+ ignorePatterns : [ "test/*.js" , "server/modules/*" , "src/util.js" ] ,
73 root : true ,
84 env : {
95 browser : true ,
106 commonjs : true ,
117 es2020 : true ,
128 node : true ,
139 } ,
14- extends : [
15- "eslint:recommended" ,
16- "plugin:vue/vue3-recommended" ,
17- "plugin:jsdoc/recommended-error" ,
18- ] ,
10+ extends : [ "eslint:recommended" , "plugin:vue/vue3-recommended" , "plugin:jsdoc/recommended-error" ] ,
1911 parser : "vue-eslint-parser" ,
2012 parserOptions : {
2113 parser : "@typescript-eslint/parser" ,
2214 sourceType : "module" ,
2315 requireConfigFile : false ,
2416 } ,
25- plugins : [
26- "jsdoc" ,
27- "@typescript-eslint" ,
28- ] ,
17+ plugins : [ "jsdoc" , "@typescript-eslint" ] ,
2918 rules : {
30- "yoda" : "error" ,
31- eqeqeq : [ "warn" , "smart" ] ,
32- "linebreak-style" : [ "error" , "unix" ] ,
33- "camelcase" : [ "warn" , {
34- "properties" : "never" ,
35- "ignoreImports" : true
36- } ] ,
37- "no-unused-vars" : [ "warn" , {
38- "args" : "none"
39- } ] ,
19+ yoda : "error" ,
20+ eqeqeq : [ "warn" , "smart" ] ,
21+ "linebreak-style" : [ "error" , "unix" ] ,
22+ camelcase : [
23+ "warn" ,
24+ {
25+ properties : "never" ,
26+ ignoreImports : true ,
27+ } ,
28+ ] ,
29+ "no-unused-vars" : [
30+ "warn" ,
31+ {
32+ args : "none" ,
33+ } ,
34+ ] ,
4035 indent : [
4136 "error" ,
4237 4 ,
4338 {
44- ignoredNodes : [ "TemplateLiteral" ] ,
39+ ignoredNodes : [ "TemplateLiteral" ] ,
4540 SwitchCase : 1 ,
4641 } ,
4742 ] ,
48- quotes : [ "error" , "double" ] ,
43+ quotes : [ "error" , "double" ] ,
4944 semi : "error" ,
50- "vue/html-indent" : [ "error" , 4 ] , // default: 2
45+ "vue/html-indent" : [ "error" , 4 ] , // default: 2
5146 "vue/max-attributes-per-line" : "off" ,
5247 "vue/singleline-html-element-content-newline" : "off" ,
5348 "vue/html-self-closing" : "off" ,
54- "vue/require-component-is" : "off" , // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675
55- "vue/attribute-hyphenation" : "off" , // This change noNL to "no-n-l" unexpectedly
49+ "vue/require-component-is" : "off" , // not allow is="style" https://github.com/vuejs/eslint-plugin-vue/issues/462#issuecomment-430234675
50+ "vue/attribute-hyphenation" : "off" , // This change noNL to "no-n-l" unexpectedly
5651 "vue/multi-word-component-names" : "off" ,
57- "no-multi-spaces" : [ "error" , {
58- ignoreEOLComments : true ,
59- } ] ,
60- "array-bracket-spacing" : [ "warn" , "always" , {
61- "singleValue" : true ,
62- "objectsInArrays" : false ,
63- "arraysInArrays" : false
64- } ] ,
65- "space-before-function-paren" : [ "error" , {
66- "anonymous" : "always" ,
67- "named" : "never" ,
68- "asyncArrow" : "always"
69- } ] ,
70- "curly" : "error" ,
71- "object-curly-spacing" : [ "error" , "always" ] ,
52+ "no-multi-spaces" : [
53+ "error" ,
54+ {
55+ ignoreEOLComments : true ,
56+ } ,
57+ ] ,
58+ "array-bracket-spacing" : [
59+ "warn" ,
60+ "always" ,
61+ {
62+ singleValue : true ,
63+ objectsInArrays : false ,
64+ arraysInArrays : false ,
65+ } ,
66+ ] ,
67+ "space-before-function-paren" : [
68+ "error" ,
69+ {
70+ anonymous : "always" ,
71+ named : "never" ,
72+ asyncArrow : "always" ,
73+ } ,
74+ ] ,
75+ curly : "error" ,
76+ "object-curly-spacing" : [ "error" , "always" ] ,
7277 "object-curly-newline" : "off" ,
7378 "object-property-newline" : "error" ,
7479 "comma-spacing" : "error" ,
@@ -80,90 +85,93 @@ module.exports = {
8085 "arrow-spacing" : "warn" ,
8186 "no-throw-literal" : "error" ,
8287 "no-trailing-spaces" : "error" ,
83- "no-constant-condition" : [ "error" , {
84- "checkLoops" : false ,
85- } ] ,
88+ "no-constant-condition" : [
89+ "error" ,
90+ {
91+ checkLoops : false ,
92+ } ,
93+ ] ,
8694 "space-before-blocks" : "warn" ,
8795 //"no-console": "warn",
8896 "no-extra-boolean-cast" : "off" ,
89- "no-multiple-empty-lines" : [ "warn" , {
90- "max" : 1 ,
91- "maxBOF" : 0 ,
92- } ] ,
93- "lines-between-class-members" : [ "warn" , "always" , {
94- exceptAfterSingleLine : true ,
95- } ] ,
97+ "no-multiple-empty-lines" : [
98+ "warn" ,
99+ {
100+ max : 1 ,
101+ maxBOF : 0 ,
102+ } ,
103+ ] ,
104+ "lines-between-class-members" : [
105+ "warn" ,
106+ "always" ,
107+ {
108+ exceptAfterSingleLine : true ,
109+ } ,
110+ ] ,
96111 "no-unneeded-ternary" : "error" ,
97- "array-bracket-newline" : [ "error" , "consistent" ] ,
98- "eol-last" : [ "error" , "always" ] ,
112+ "array-bracket-newline" : [ "error" , "consistent" ] ,
113+ "eol-last" : [ "error" , "always" ] ,
99114 //"prefer-template": "error",
100- "template-curly-spacing" : [ "warn" , "never" ] ,
101- "comma-dangle" : [ "warn" , "only-multiline" ] ,
102- "no-empty" : [ "error" , {
103- "allowEmptyCatch" : true
104- } ] ,
115+ "template-curly-spacing" : [ "warn" , "never" ] ,
116+ "comma-dangle" : [ "warn" , "only-multiline" ] ,
117+ "no-empty" : [
118+ "error" ,
119+ {
120+ allowEmptyCatch : true ,
121+ } ,
122+ ] ,
105123 "no-control-regex" : "off" ,
106- "one-var" : [ "error" , "never" ] ,
107- "max-statements-per-line" : [ "error" , { " max" : 1 } ] ,
124+ "one-var" : [ "error" , "never" ] ,
125+ "max-statements-per-line" : [ "error" , { max : 1 } ] ,
108126 "jsdoc/check-tag-names" : [
109127 "error" ,
110128 {
111- " definedTags" : [ "link" ]
112- }
129+ definedTags : [ "link" ] ,
130+ } ,
113131 ] ,
114132 "jsdoc/no-undefined-types" : "off" ,
115- "jsdoc/no-defaults" : [
116- "error" ,
117- { "noOptionalParamNames" : true }
118- ] ,
133+ "jsdoc/no-defaults" : [ "error" , { noOptionalParamNames : true } ] ,
119134 "jsdoc/require-throws" : "warn" ,
120135 "jsdoc/require-jsdoc" : [
121136 "error" ,
122137 {
123- " require" : {
124- " FunctionDeclaration" : true ,
125- " MethodDefinition" : true ,
126- }
127- }
138+ require : {
139+ FunctionDeclaration : true ,
140+ MethodDefinition : true ,
141+ } ,
142+ } ,
128143 ] ,
129144 "jsdoc/no-blank-block-descriptions" : "error" ,
130145 "jsdoc/require-returns-description" : "warn" ,
131- "jsdoc/require-returns-check" : [
132- "error" ,
133- { "reportMissingReturnForUndefinedTypes" : false }
134- ] ,
146+ "jsdoc/require-returns-check" : [ "error" , { reportMissingReturnForUndefinedTypes : false } ] ,
135147 "jsdoc/require-returns" : [
136148 "warn" ,
137149 {
138- " forceRequireReturn" : true ,
139- " forceReturnsWithAsync" : true
140- }
150+ forceRequireReturn : true ,
151+ forceReturnsWithAsync : true ,
152+ } ,
141153 ] ,
142154 "jsdoc/require-param-type" : "warn" ,
143- "jsdoc/require-param-description" : "warn"
155+ "jsdoc/require-param-description" : "warn" ,
144156 } ,
145- " overrides" : [
157+ overrides : [
146158 {
147- " files" : [ "src/languages/*.js" , "src/icon.js" ] ,
148- " rules" : {
149- "comma-dangle" : [ "error" , "always-multiline" ] ,
150- }
159+ files : [ "src/languages/*.js" , "src/icon.js" ] ,
160+ rules : {
161+ "comma-dangle" : [ "error" , "always-multiline" ] ,
162+ } ,
151163 } ,
152164
153165 // Override for TypeScript
154166 {
155- "files" : [
156- "**/*.ts" ,
157- ] ,
158- extends : [
159- "plugin:@typescript-eslint/recommended" ,
160- ] ,
161- "rules" : {
167+ files : [ "**/*.ts" ] ,
168+ extends : [ "plugin:@typescript-eslint/recommended" ] ,
169+ rules : {
162170 "jsdoc/require-returns-type" : "off" ,
163171 "jsdoc/require-param-type" : "off" ,
164172 "@typescript-eslint/no-explicit-any" : "off" ,
165173 "prefer-const" : "off" ,
166- }
167- }
168- ]
174+ } ,
175+ } ,
176+ ] ,
169177} ;
0 commit comments