@@ -22,6 +22,9 @@ const biomeConfigPath = path.join(rootPath, BIOME_JSON)
22
22
const gitignorePath = path . join ( rootPath , GIT_IGNORE )
23
23
24
24
const biomeConfig = require ( biomeConfigPath )
25
+ const nodeGlobalsConfig = Object . fromEntries (
26
+ Object . entries ( globals . node ) . map ( ( [ k ] ) => [ k , 'readonly' ] )
27
+ )
25
28
26
29
module . exports = [
27
30
includeIgnoreFile ( gitignorePath ) ,
@@ -39,9 +42,13 @@ module.exports = [
39
42
...importXPlugin . flatConfigs . recommended . languageOptions ,
40
43
...nodePlugin . configs [ 'flat/recommended-script' ] . languageOptions ,
41
44
ecmaVersion : LATEST ,
42
- globals : Object . fromEntries (
43
- Object . entries ( globals . node ) . map ( ( [ k ] ) => [ k , 'readonly' ] )
44
- ) ,
45
+ globals : {
46
+ ...js . configs . recommended . languageOptions ?. globals ,
47
+ ...importXPlugin . flatConfigs . recommended . languageOptions ?. globals ,
48
+ ...nodePlugin . configs [ 'flat/recommended-script' ] . languageOptions
49
+ ?. globals ,
50
+ ...nodeGlobalsConfig
51
+ } ,
45
52
sourceType : 'script'
46
53
} ,
47
54
linterOptions : {
@@ -120,7 +127,11 @@ module.exports = [
120
127
'no-undef' : 'error' ,
121
128
'no-unused-vars' : [
122
129
'error' ,
123
- { argsIgnorePattern : '^_|^this$' , ignoreRestSiblings : true }
130
+ {
131
+ argsIgnorePattern : '^_|^this$' ,
132
+ ignoreRestSiblings : true ,
133
+ varsIgnorePattern : '^_'
134
+ }
124
135
] ,
125
136
'no-var' : 'error' ,
126
137
'no-warning-comments' : [ 'warn' , { terms : [ 'fixme' ] } ] ,
0 commit comments