Skip to content

Commit 2e8eb9d

Browse files
committed
Cleanup configs
1 parent af16310 commit 2e8eb9d

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

eslint.config.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ const biomeConfigPath = path.join(rootPath, BIOME_JSON)
2222
const gitignorePath = path.join(rootPath, GIT_IGNORE)
2323

2424
const biomeConfig = require(biomeConfigPath)
25+
const nodeGlobalsConfig = Object.fromEntries(
26+
Object.entries(globals.node).map(([k]) => [k, 'readonly'])
27+
)
2528

2629
module.exports = [
2730
includeIgnoreFile(gitignorePath),
@@ -39,9 +42,13 @@ module.exports = [
3942
...importXPlugin.flatConfigs.recommended.languageOptions,
4043
...nodePlugin.configs['flat/recommended-script'].languageOptions,
4144
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+
},
4552
sourceType: 'script'
4653
},
4754
linterOptions: {
@@ -120,7 +127,11 @@ module.exports = [
120127
'no-undef': 'error',
121128
'no-unused-vars': [
122129
'error',
123-
{ argsIgnorePattern: '^_|^this$', ignoreRestSiblings: true }
130+
{
131+
argsIgnorePattern: '^_|^this$',
132+
ignoreRestSiblings: true,
133+
varsIgnorePattern: '^_'
134+
}
124135
],
125136
'no-var': 'error',
126137
'no-warning-comments': ['warn', { terms: ['fixme'] }],

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@
3333
"noUnusedParameters": true,
3434
"noUncheckedSideEffectImports": true
3535
},
36-
"include": ["**/*.ts"],
37-
"exclude": []
36+
"include": ["**/*.ts"]
3837
}

0 commit comments

Comments
 (0)