1
- const prettierConfig = require ( './.prettierrc' )
2
-
3
1
/**
4
2
* @file ESLint Configuration - Base
5
3
* @see https://eslint.org/docs/user-guide/configuring
@@ -26,7 +24,7 @@ module.exports = {
26
24
impliedStrict : true ,
27
25
jsx : true
28
26
} ,
29
- extraFileExtensions : [ 'cjs' ] ,
27
+ extraFileExtensions : [ '. cjs' , '.mjs '] ,
30
28
project : [ './packages/**/tsconfig.json' , './tsconfig.json' ] ,
31
29
sourceType : 'module' ,
32
30
tsconfigRootDir : __dirname ,
@@ -87,7 +85,7 @@ module.exports = {
87
85
] ,
88
86
'no-ex-assign' : 0 ,
89
87
'prefer-arrow-callback' : 2 ,
90
- 'prettier/prettier' : [ 2 , prettierConfig ] ,
88
+ 'prettier/prettier' : [ 2 , require ( './.prettierrc.cjs' ) ] ,
91
89
'sort-keys' : [
92
90
1 ,
93
91
'asc' ,
@@ -116,16 +114,21 @@ module.exports = {
116
114
skipWordIfMatch : [ ] ,
117
115
skipWords : [
118
116
'argv' ,
117
+ 'basedir' ,
119
118
'bundlers' ,
120
119
'cjs' ,
121
120
'commitlint' ,
121
+ 'commonjs' ,
122
122
'cmd' ,
123
123
'dotenv' ,
124
124
'enum' ,
125
125
'esm' ,
126
- 'esm5 ' ,
126
+ 'extensionless ' ,
127
127
'formatter' ,
128
+ 'loadenv' ,
129
+ 'mjs' ,
128
130
'perf' ,
131
+ 'pkgfile' ,
129
132
'pnv' ,
130
133
'postinstall' ,
131
134
'prepack' ,
@@ -134,14 +137,17 @@ module.exports = {
134
137
'stderr' ,
135
138
'stdout' ,
136
139
'tgz' ,
140
+ 'tsc' ,
137
141
'tsconfig' ,
138
142
'ttsc' ,
139
143
'typeof' ,
140
144
'umd' ,
141
145
'usr' ,
146
+ 'wasm' ,
142
147
'wip' ,
143
148
'workspace' ,
144
- 'workspaces'
149
+ 'workspaces' ,
150
+ 'yargs'
145
151
] ,
146
152
strings : true
147
153
}
@@ -220,31 +226,34 @@ module.exports = {
220
226
} ,
221
227
overrides : [
222
228
{
223
- files : [ '**/*.cjs' , '**/*.js' , '**/*.md/*.js' ] ,
224
- parser : `${ __dirname } /node_modules/@babel/eslint-parser/lib/index.cjs` ,
225
- parserOptions : {
226
- requireConfigFile : false
227
- } ,
229
+ files : [ '**/*.cjs' ] ,
228
230
rules : {
229
- '@typescript-eslint/explicit-module-boundary-types' : 0 ,
230
- '@typescript-eslint/no-var-requires' : 0
231
+ 'unicorn/prefer-module' : 0
231
232
}
232
233
} ,
233
234
{
234
- files : [ '**/*.cjs' , '*.js' ] ,
235
+ files : [ '**/*.cjs' , '**/*.md/* .js' ] ,
235
236
rules : {
236
- 'unicorn/prefer-module' : 0
237
+ '@typescript-eslint/no-var-requires' : 0
238
+ }
239
+ } ,
240
+ {
241
+ files : [ '**/*.cjs' , '**/*.mjs' ] ,
242
+ parser : `${ __dirname } /node_modules/@babel/eslint-parser/lib/index.cjs` ,
243
+ parserOptions : {
244
+ requireConfigFile : false
237
245
}
238
246
} ,
239
247
{
240
248
files : [ '**/*.md' ] ,
249
+ extends : [ 'plugin:markdownlint/recommended' ] ,
250
+ parser : require . resolve ( 'eslint-plugin-markdownlint/parser' ) ,
241
251
processor : 'markdown/markdown'
242
252
} ,
243
253
{
244
254
files : [ '**/*.md/*.ts' ] ,
245
255
parser : require . resolve ( '@typescript-eslint/parser' )
246
256
} ,
247
-
248
257
{
249
258
files : [ '**/*.spec.ts' ] ,
250
259
env : {
@@ -273,7 +282,7 @@ module.exports = {
273
282
}
274
283
} ,
275
284
{
276
- files : [ '**/__mocks__/**' , '**/__tests__/**' , '**/tools/**' , '*.js' ] ,
285
+ files : [ '**/__mocks__/**' , '**/__tests__/**' , '**/tools/**' ] ,
277
286
rules : {
278
287
'tree-shaking/no-side-effects-in-initialization' : 0
279
288
}
@@ -285,6 +294,12 @@ module.exports = {
285
294
'@typescript-eslint/triple-slash-reference' : 0 ,
286
295
'unicorn/filename-case' : 0
287
296
}
297
+ } ,
298
+ {
299
+ files : [ 'tools/loaders/env.cjs' ] ,
300
+ rules : {
301
+ 'unicorn/no-array-reduce' : 0
302
+ }
288
303
}
289
304
] ,
290
305
settings : {
0 commit comments