Skip to content

Commit cc69ea8

Browse files
committed
feat: upgrade eslint version and update configuration
1 parent 85ae1d0 commit cc69ea8

File tree

5 files changed

+954
-1014
lines changed

5 files changed

+954
-1014
lines changed

.eslintignore

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

.eslintrc.js

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

eslint.config.mjs

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

0 commit comments

Comments
 (0)