Skip to content

Commit ad62245

Browse files
committed
Upgrade ESLint.
1 parent 630150e commit ad62245

File tree

4 files changed

+253
-293
lines changed

4 files changed

+253
-293
lines changed

.eslintrc.json

-18
This file was deleted.

eslint.config.mjs

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
{
18+
ignores: ['node_modules/**'],
19+
},
20+
...compat.extends(
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/recommended-type-checked",
23+
"plugin:@typescript-eslint/stylistic-type-checked",
24+
), {
25+
plugins: {
26+
"@typescript-eslint": typescriptEslint,
27+
},
28+
files: ['**/*.ts', '**/*.tsx'],
29+
languageOptions: {
30+
parser: tsParser,
31+
ecmaVersion: 5,
32+
sourceType: "script",
33+
34+
parserOptions: {
35+
project: true,
36+
},
37+
},
38+
39+
rules: {
40+
"@typescript-eslint/no-explicit-any": "off",
41+
},
42+
}];

0 commit comments

Comments
 (0)