1
- import typescriptEslint from " @typescript-eslint/eslint-plugin" ;
2
- import globals from " globals" ;
3
- import tsParser from " @typescript-eslint/parser" ;
4
- import path from " node:path" ;
5
- import { fileURLToPath } from " node:url" ;
6
- import js from " @eslint/js" ;
7
- import { FlatCompat } from " @eslint/eslintrc" ;
1
+ import typescriptEslint from ' @typescript-eslint/eslint-plugin' ;
2
+ import globals from ' globals' ;
3
+ import tsParser from ' @typescript-eslint/parser' ;
4
+ import path from ' node:path' ;
5
+ import { fileURLToPath } from ' node:url' ;
6
+ import js from ' @eslint/js' ;
7
+ import { FlatCompat } from ' @eslint/eslintrc' ;
8
8
9
9
const __filename = fileURLToPath ( import . meta. url ) ;
10
10
const __dirname = path . dirname ( __filename ) ;
@@ -16,146 +16,146 @@ const compat = new FlatCompat({
16
16
17
17
export default [ {
18
18
ignores : [
19
- " src/vendor/**/*" ,
20
- " src/solid/**/*" ,
21
- " src/opus-recorder/**/*" ,
22
- " public/**/*" ,
23
- ] ,
19
+ ' src/vendor/**/*' ,
20
+ ' src/solid/**/*' ,
21
+ ' src/opus-recorder/**/*' ,
22
+ ' public/**/*'
23
+ ]
24
24
} , ...compat . extends ( ) , {
25
25
plugins : {
26
- " @typescript-eslint" : typescriptEslint ,
26
+ ' @typescript-eslint' : typescriptEslint
27
27
} ,
28
-
28
+
29
29
languageOptions : {
30
30
globals : {
31
- ...globals . browser ,
31
+ ...globals . browser
32
32
} ,
33
-
33
+
34
34
parser : tsParser ,
35
- ecmaVersion : " latest" ,
36
- sourceType : " module" ,
37
-
35
+ ecmaVersion : ' latest' ,
36
+ sourceType : ' module' ,
37
+
38
38
parserOptions : {
39
- project : [ " ./tsconfig.json" ] ,
40
- } ,
39
+ project : [ ' ./tsconfig.json' ]
40
+ }
41
41
} ,
42
-
42
+
43
43
rules : {
44
- " max-len" : " off" ,
45
-
46
- " keyword-spacing" : [ " error" , {
44
+ ' max-len' : ' off' ,
45
+
46
+ ' keyword-spacing' : [ ' error' , {
47
47
after : true ,
48
-
48
+
49
49
overrides : {
50
50
if : {
51
51
before : true ,
52
- after : false ,
52
+ after : false
53
53
} ,
54
-
54
+
55
55
else : {
56
- before : true ,
56
+ before : true
57
57
} ,
58
-
58
+
59
59
catch : {
60
60
before : true ,
61
- after : false ,
61
+ after : false
62
62
} ,
63
-
63
+
64
64
for : {
65
- after : false ,
65
+ after : false
66
66
} ,
67
-
67
+
68
68
while : {
69
- after : false ,
69
+ after : false
70
70
} ,
71
-
71
+
72
72
switch : {
73
- after : false ,
74
- } ,
75
- } ,
73
+ after : false
74
+ }
75
+ }
76
76
} ] ,
77
-
78
- " linebreak-style" : [ " error" , " unix" ] ,
79
- " eol-last" : " error" ,
80
-
81
- indent : [ " error" , 2 , {
77
+
78
+ ' linebreak-style' : [ ' error' , ' unix' ] ,
79
+ ' eol-last' : ' error' ,
80
+
81
+ ' indent' : [ ' error' , 2 , {
82
82
CallExpression : {
83
- arguments : 1 ,
83
+ arguments : 1
84
84
} ,
85
-
85
+
86
86
FunctionDeclaration : {
87
87
body : 1 ,
88
- parameters : 1 ,
88
+ parameters : 1
89
89
} ,
90
-
90
+
91
91
FunctionExpression : {
92
92
body : 1 ,
93
- parameters : 1 ,
93
+ parameters : 1
94
94
} ,
95
-
95
+
96
96
MemberExpression : 0 ,
97
97
ObjectExpression : 1 ,
98
98
SwitchCase : 1 ,
99
- ignoredNodes : [ " ConditionalExpression" ] ,
99
+ ignoredNodes : [ ' ConditionalExpression' ]
100
100
} ] ,
101
-
102
- " space-before-function-paren" : [ " error" , " never" ] ,
103
- " prefer-promise-reject-errors" : " off" ,
104
- curly : " off" ,
105
- " comma-dangle" : [ " error" , " never" ] ,
106
- " comma-spacing" : " error" ,
107
- " comma-style" : " error" ,
108
- " quote-props" : [ " error" , " consistent" ] ,
109
-
110
- quotes : [ " error" , " single" , {
111
- allowTemplateLiterals : true ,
101
+
102
+ ' space-before-function-paren' : [ ' error' , ' never' ] ,
103
+ ' prefer-promise-reject-errors' : ' off' ,
104
+ ' curly' : ' off' ,
105
+ ' comma-dangle' : [ ' error' , ' never' ] ,
106
+ ' comma-spacing' : ' error' ,
107
+ ' comma-style' : ' error' ,
108
+ ' quote-props' : [ ' error' , ' consistent' ] ,
109
+
110
+ ' quotes' : [ ' error' , ' single' , {
111
+ allowTemplateLiterals : true
112
112
} ] ,
113
-
114
- " space-before-blocks" : [ " error" , " always" ] ,
115
- " spaced-comment" : [ " error" , " always" ] ,
116
- " prefer-spread" : " off" ,
117
-
118
- " prefer-const" : [ " error" , {
119
- destructuring : " all" ,
113
+
114
+ ' space-before-blocks' : [ ' error' , ' always' ] ,
115
+ ' spaced-comment' : [ ' error' , ' always' ] ,
116
+ ' prefer-spread' : ' off' ,
117
+
118
+ ' prefer-const' : [ ' error' , {
119
+ destructuring : ' all'
120
120
} ] ,
121
-
122
- " object-curly-spacing" : [ " error" , " never" ] ,
123
- " array-bracket-spacing" : [ " error" , " never" ] ,
124
- " switch-colon-spacing" : " error" ,
125
- " operator-linebreak" : [ " error" , " after" ] ,
126
- " padded-blocks" : [ " error" , " never" ] ,
127
- " no-useless-call" : " error" ,
128
- " no-trailing-spaces" : " error" ,
129
- " no-mixed-spaces-and-tabs" : " error" ,
130
-
131
- " no-multiple-empty-lines" : [ " error" , {
132
- max : 2 ,
121
+
122
+ ' object-curly-spacing' : [ ' error' , ' never' ] ,
123
+ ' array-bracket-spacing' : [ ' error' , ' never' ] ,
124
+ ' switch-colon-spacing' : ' error' ,
125
+ ' operator-linebreak' : [ ' error' , ' after' ] ,
126
+ ' padded-blocks' : [ ' error' , ' never' ] ,
127
+ ' no-useless-call' : ' error' ,
128
+ ' no-trailing-spaces' : ' error' ,
129
+ ' no-mixed-spaces-and-tabs' : ' error' ,
130
+
131
+ ' no-multiple-empty-lines' : [ ' error' , {
132
+ max : 2
133
133
} ] ,
134
-
135
- " no-tabs" : " error" ,
136
- " no-multi-str" : " error" ,
137
- " no-new-wrappers" : " error" ,
138
-
139
- " no-irregular-whitespace" : [ " error" , {
134
+
135
+ ' no-tabs' : ' error' ,
136
+ ' no-multi-str' : ' error' ,
137
+ ' no-new-wrappers' : ' error' ,
138
+
139
+ ' no-irregular-whitespace' : [ ' error' , {
140
140
skipStrings : true ,
141
141
skipComments : true ,
142
142
skipRegExps : true ,
143
- skipTemplates : true ,
143
+ skipTemplates : true
144
144
} ] ,
145
-
146
- " no-unexpected-multiline" : " error" ,
147
- " no-return-await" : " error" ,
148
- " @typescript-eslint/await-thenable" : " error" ,
149
- } ,
145
+
146
+ ' no-unexpected-multiline' : ' error' ,
147
+ ' no-return-await' : ' error' ,
148
+ ' @typescript-eslint/await-thenable' : ' error'
149
+ }
150
150
} , {
151
- files : [ " **/*.ts" ] ,
152
-
151
+ files : [ ' **/*.ts' ] ,
152
+
153
153
languageOptions : {
154
154
ecmaVersion : 5 ,
155
- sourceType : " script" ,
156
-
155
+ sourceType : ' script' ,
156
+
157
157
parserOptions : {
158
- project : [ " ./tsconfig.json" ] ,
159
- } ,
160
- } ,
161
- } ] ;
158
+ project : [ ' ./tsconfig.json' ]
159
+ }
160
+ }
161
+ } ] ;
0 commit comments