Skip to content

Commit 814c2f0

Browse files
committed
Migrates eslint to non-deprecated config
1 parent dcfc23d commit 814c2f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

eslint.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @ts-check
22
import globals from 'globals';
33
import { includeIgnoreFile } from '@eslint/compat';
4+
import { defineConfig } from 'eslint/config';
45
import js from '@eslint/js';
56
import ts from 'typescript-eslint';
67
import antiTrojanSource from 'eslint-plugin-anti-trojan-source';
@@ -143,7 +144,7 @@ const restrictedImports = {
143144

144145
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
145146

146-
export default ts.config(
147+
export default defineConfig(
147148
includeIgnoreFile(gitignorePath),
148149
{ ignores: ignorePatterns.default },
149150
js.configs.recommended,
@@ -154,8 +155,11 @@ export default ts.config(
154155
languageOptions: { ...defaultLanguageOptions },
155156
linterOptions: { reportUnusedDisableDirectives: true },
156157
plugins: {
158+
// @ts-ignore
157159
'import-x': importX,
160+
// @ts-ignore
158161
'anti-trojan-source': antiTrojanSource,
162+
// @ts-ignore
159163
'@gitlens': { rules: { 'no-src-imports': noSrcImports } },
160164
},
161165
rules: {

0 commit comments

Comments
 (0)