@@ -8,13 +8,13 @@ module.exports = defineConfig({
8
8
'eslint:recommended' ,
9
9
'plugin:node/recommended' ,
10
10
'plugin:@typescript-eslint/recommended' ,
11
- 'plugin:regexp/recommended'
11
+ 'plugin:regexp/recommended' ,
12
12
] ,
13
13
plugins : [ 'import' , 'regexp' ] ,
14
14
parser : '@typescript-eslint/parser' ,
15
15
parserOptions : {
16
16
sourceType : 'module' ,
17
- ecmaVersion : 2021
17
+ ecmaVersion : 2021 ,
18
18
} ,
19
19
rules : {
20
20
eqeqeq : [ 'warn' , 'always' , { null : 'never' } ] ,
@@ -25,36 +25,36 @@ module.exports = defineConfig({
25
25
'prefer-const' : [
26
26
'warn' ,
27
27
{
28
- destructuring : 'all'
29
- }
28
+ destructuring : 'all' ,
29
+ } ,
30
30
] ,
31
31
32
32
'node/no-missing-import' : [
33
33
'error' ,
34
34
{
35
35
allowModules : [ 'types' , 'estree' , 'less' , 'sass' , 'stylus' ] ,
36
- tryExtensions : [ '.ts' , '.js' , '.jsx' , '.tsx' , '.d.ts' ]
37
- }
36
+ tryExtensions : [ '.ts' , '.js' , '.jsx' , '.tsx' , '.d.ts' ] ,
37
+ } ,
38
38
] ,
39
39
'node/no-missing-require' : [
40
40
'error' ,
41
41
{
42
42
// for try-catching yarn pnp
43
43
allowModules : [ 'pnpapi' , 'vite' ] ,
44
- tryExtensions : [ '.ts' , '.js' , '.jsx' , '.tsx' , '.d.ts' ]
45
- }
44
+ tryExtensions : [ '.ts' , '.js' , '.jsx' , '.tsx' , '.d.ts' ] ,
45
+ } ,
46
46
] ,
47
47
'node/no-extraneous-import' : [
48
48
'error' ,
49
49
{
50
- allowModules : [ 'vite' , 'less' , 'sass' , 'vitest' ]
51
- }
50
+ allowModules : [ 'vite' , 'less' , 'sass' , 'vitest' ] ,
51
+ } ,
52
52
] ,
53
53
'node/no-extraneous-require' : [
54
54
'error' ,
55
55
{
56
- allowModules : [ 'vite' ]
57
- }
56
+ allowModules : [ 'vite' ] ,
57
+ } ,
58
58
] ,
59
59
'node/no-deprecated-api' : 'off' ,
60
60
'node/no-unpublished-import' : 'off' ,
@@ -65,11 +65,11 @@ module.exports = defineConfig({
65
65
'@typescript-eslint/ban-types' : 'off' , // TODO: we should turn this on in a new PR
66
66
'@typescript-eslint/explicit-module-boundary-types' : [
67
67
'error' ,
68
- { allowArgumentsExplicitlyTypedAsAny : true }
68
+ { allowArgumentsExplicitlyTypedAsAny : true } ,
69
69
] ,
70
70
'@typescript-eslint/no-empty-function' : [
71
71
'error' ,
72
- { allow : [ 'arrowFunctions' ] }
72
+ { allow : [ 'arrowFunctions' ] } ,
73
73
] ,
74
74
'@typescript-eslint/no-empty-interface' : 'off' ,
75
75
'@typescript-eslint/no-explicit-any' : 'off' , // maybe we should turn this on in a new PR
@@ -80,12 +80,12 @@ module.exports = defineConfig({
80
80
'@typescript-eslint/no-var-requires' : 'off' ,
81
81
'@typescript-eslint/consistent-type-imports' : [
82
82
'error' ,
83
- { prefer : 'type-imports' }
83
+ { prefer : 'type-imports' } ,
84
84
] ,
85
85
86
86
'import/no-nodejs-modules' : [
87
87
'error' ,
88
- { allow : builtinModules . map ( ( mod ) => `node:${ mod } ` ) }
88
+ { allow : builtinModules . map ( ( mod ) => `node:${ mod } ` ) } ,
89
89
] ,
90
90
'import/no-duplicates' : 'error' ,
91
91
'import/order' : 'error' ,
@@ -96,27 +96,32 @@ module.exports = defineConfig({
96
96
ignoreDeclarationSort : true ,
97
97
ignoreMemberSort : false ,
98
98
memberSyntaxSortOrder : [ 'none' , 'all' , 'multiple' , 'single' ] ,
99
- allowSeparatedGroups : false
100
- }
99
+ allowSeparatedGroups : false ,
100
+ } ,
101
101
] ,
102
102
103
- 'regexp/no-contradiction-with-assertion' : 'error'
103
+ 'regexp/no-contradiction-with-assertion' : 'error' ,
104
104
} ,
105
105
overrides : [
106
106
{
107
107
files : [ 'packages/**' ] ,
108
108
excludedFiles : '**/__tests__/**' ,
109
109
rules : {
110
- 'no-restricted-globals' : [ 'error' , 'require' , '__dirname' , '__filename' ]
111
- }
110
+ 'no-restricted-globals' : [
111
+ 'error' ,
112
+ 'require' ,
113
+ '__dirname' ,
114
+ '__filename' ,
115
+ ] ,
116
+ } ,
112
117
} ,
113
118
{
114
119
files : [ '**/build.config.ts' ] ,
115
120
rules : {
116
121
'no-undef' : 'off' ,
117
122
'node/no-missing-import' : 'off' ,
118
- '@typescript-eslint/explicit-module-boundary-types' : 'off'
119
- }
123
+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
124
+ } ,
120
125
} ,
121
126
{
122
127
files : [ 'playground/**' ] ,
@@ -129,17 +134,17 @@ module.exports = defineConfig({
129
134
'node/no-unsupported-features/es-builtins' : [
130
135
'error' ,
131
136
{
132
- version : '^14.18.0 || >=16.0.0'
133
- }
137
+ version : '^14.18.0 || >=16.0.0' ,
138
+ } ,
134
139
] ,
135
140
'node/no-unsupported-features/node-builtins' : [
136
141
'error' ,
137
142
{
138
- version : '^14.18.0 || >=16.0.0'
139
- }
143
+ version : '^14.18.0 || >=16.0.0' ,
144
+ } ,
140
145
] ,
141
- '@typescript-eslint/explicit-module-boundary-types' : 'off'
142
- }
146
+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
147
+ } ,
143
148
} ,
144
149
{
145
150
files : [ 'playground/**' ] ,
@@ -148,21 +153,21 @@ module.exports = defineConfig({
148
153
'no-undef' : 'off' ,
149
154
'no-empty' : 'off' ,
150
155
'no-constant-condition' : 'off' ,
151
- '@typescript-eslint/no-empty-function' : 'off'
152
- }
156
+ '@typescript-eslint/no-empty-function' : 'off' ,
157
+ } ,
153
158
} ,
154
159
{
155
160
files : [ '*.js' , '*.mjs' , '*.cjs' ] ,
156
161
rules : {
157
- '@typescript-eslint/explicit-module-boundary-types' : 'off'
158
- }
162
+ '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
163
+ } ,
159
164
} ,
160
165
{
161
166
files : [ '*.d.ts' ] ,
162
167
rules : {
163
- '@typescript-eslint/triple-slash-reference' : 'off'
164
- }
165
- }
168
+ '@typescript-eslint/triple-slash-reference' : 'off' ,
169
+ } ,
170
+ } ,
166
171
] ,
167
- reportUnusedDisableDirectives : true
172
+ reportUnusedDisableDirectives : true ,
168
173
} )
0 commit comments