Skip to content

Commit 2a32e75

Browse files
committed
dependency: update eslint
1 parent 0acaf42 commit 2a32e75

File tree

4 files changed

+680
-749
lines changed

4 files changed

+680
-749
lines changed

.eslintrc.json

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

eslint.config.mjs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
...compat.extends(
19+
"eslint:recommended",
20+
"plugin:@typescript-eslint/eslint-recommended",
21+
"plugin:@typescript-eslint/recommended",
22+
"plugin:prettier/recommended",
23+
"prettier",
24+
),
25+
{
26+
plugins: {
27+
"@typescript-eslint": typescriptEslint,
28+
},
29+
30+
languageOptions: {
31+
globals: {
32+
...globals.node,
33+
},
34+
35+
parser: tsParser,
36+
ecmaVersion: 5,
37+
sourceType: "module",
38+
39+
parserOptions: {
40+
project: "./tsconfig.json",
41+
},
42+
},
43+
44+
rules: {
45+
"no-empty-function": "off",
46+
"@typescript-eslint/no-empty-function": ["off"],
47+
"@typescript-eslint/explicit-module-boundary-types": "off",
48+
"@typescript-eslint/explicit-function-return-type": "off",
49+
50+
"prettier/prettier": [
51+
"error",
52+
{
53+
tabWidth: 4,
54+
endOfLine: "auto",
55+
},
56+
],
57+
},
58+
},
59+
];

0 commit comments

Comments
 (0)