Skip to content

Commit 6d36457

Browse files
committed
...
1 parent d638a9a commit 6d36457

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

eslint.config.mjs

+51-40
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,72 @@ import { FlatCompat } from "@eslint/eslintrc";
1010
const __filename = fileURLToPath(import.meta.url);
1111
const __dirname = path.dirname(__filename);
1212
const compat = new FlatCompat({
13-
baseDirectory: __dirname,
14-
recommendedConfig: js.configs.recommended,
15-
allConfig: js.configs.all
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
1616
});
1717

18-
export default [...fixupConfigRules(compat.extends(
19-
"plugin:@typescript-eslint/eslint-recommended",
20-
"plugin:@typescript-eslint/recommended",
21-
"plugin:@typescript-eslint/recommended-requiring-type-checking",
22-
"plugin:import/recommended",
23-
"plugin:import/typescript",
24-
"prettier",
25-
"plugin:prettier/recommended",
26-
)), {
18+
export default [
19+
...fixupConfigRules(
20+
compat.extends(
21+
"plugin:@typescript-eslint/eslint-recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
24+
"plugin:import/recommended",
25+
"plugin:import/typescript",
26+
"prettier",
27+
"plugin:prettier/recommended",
28+
),
29+
),
30+
{
2731
plugins: {
28-
"@typescript-eslint": fixupPluginRules(typescriptEslint),
32+
"@typescript-eslint": fixupPluginRules(typescriptEslint),
2933
},
3034

3135
languageOptions: {
32-
globals: {
33-
...globals.browser,
34-
...globals.commonjs,
35-
...globals.jest,
36-
...globals.node,
37-
},
36+
globals: {
37+
...globals.browser,
38+
...globals.commonjs,
39+
...globals.jest,
40+
...globals.node,
41+
},
3842

39-
parser: tsParser,
40-
ecmaVersion: 7,
41-
sourceType: "module",
43+
parser: tsParser,
44+
ecmaVersion: 7,
45+
sourceType: "module",
4246

43-
parserOptions: {
44-
project: ["./tsconfig.eslint.json"],
45-
},
47+
parserOptions: {
48+
project: ["./tsconfig.eslint.json"],
49+
},
4650
},
4751

4852
settings: {
49-
"import/resolver": {
50-
typescript: true,
51-
node: true,
52-
},
53+
"import/resolver": {
54+
typescript: true,
55+
node: true,
56+
},
5357
},
5458

5559
rules: {
56-
"prettier/prettier": "error",
57-
"@typescript-eslint/consistent-type-imports": "error",
60+
"prettier/prettier": "error",
61+
"@typescript-eslint/consistent-type-imports": "error",
5862

59-
"@typescript-eslint/no-empty-interface": ["error", {
60-
allowSingleExtends: true,
61-
}],
63+
"@typescript-eslint/no-empty-interface": [
64+
"error",
65+
{
66+
allowSingleExtends: true,
67+
},
68+
],
6269

63-
"@typescript-eslint/no-use-before-define": ["error", {
64-
functions: false,
65-
}],
70+
"@typescript-eslint/no-use-before-define": [
71+
"error",
72+
{
73+
functions: false,
74+
},
75+
],
6676

67-
"@typescript-eslint/no-explicit-any": [0],
68-
"import/no-named-as-default-member": [0],
77+
"@typescript-eslint/no-explicit-any": [0],
78+
"import/no-named-as-default-member": [0],
6979
},
70-
}];
80+
},
81+
];

tsconfig.eslint.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": "./tsconfig.json",
33
"include": ["jest.config.ts", "jest.setup.ts", "eslint.config.mjs", "./src"],
4-
"exclude": []
4+
"exclude": [],
5+
"compilerOptions": {
6+
"allowJs": true,
7+
},
58
}

0 commit comments

Comments
 (0)