Skip to content

Commit 3e196fc

Browse files
committed
Convert .eslintec to eslint.config.mjs
1 parent e370879 commit 3e196fc

File tree

3 files changed

+41
-25
lines changed

3 files changed

+41
-25
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin"
2+
import globals from "globals"
3+
import tsParser from "@typescript-eslint/parser"
4+
import path from "node:path"
5+
import { fileURLToPath } from "node:url"
6+
import js from "@eslint/js"
7+
import { FlatCompat } from "@eslint/eslintrc"
8+
9+
const __filename = fileURLToPath(import.meta.url)
10+
const __dirname = path.dirname(__filename)
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
})
16+
17+
export default [
18+
{
19+
ignores: ["node_modules", "dist", "**/zz_*"],
20+
},
21+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
22+
{
23+
plugins: {
24+
"@typescript-eslint": typescriptEslint,
25+
},
26+
languageOptions: {
27+
globals: {
28+
...globals.node,
29+
},
30+
31+
parser: tsParser,
32+
},
33+
rules: {
34+
"no-debugger": "off",
35+
"no-unused-vars": "off",
36+
"prefer-const": "warn",
37+
"no-inner-declarations": "off",
38+
"@typescript-eslint/no-unused-vars": "off",
39+
}
40+
}
41+
]

0 commit comments

Comments
 (0)