Skip to content

Commit 6987f81

Browse files
committed
frontend: fix linting and typechecking
1 parent e21752a commit 6987f81

23 files changed

+667
-539
lines changed

frontend/.eslintignore

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

frontend/.eslintrc.json

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

frontend/eslint.config.mjs

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import js from "@eslint/js";
5+
import tseslint from "typescript-eslint";
6+
7+
8+
export default defineConfig([
9+
globalIgnores([
10+
"**/dist/",
11+
"**/node_modules/",
12+
"**/target/",
13+
"**/pkg/",
14+
"**/*.config.ts",
15+
"**/*.config.js",
16+
"**/test-results/",
17+
"**/playwright-report/",
18+
"**/dist/",
19+
"**/node_modules/",
20+
"**/target/",
21+
"**/pkg/",
22+
"**/*.config.ts",
23+
"**/*.config.js",
24+
"**/test-results/",
25+
"**/playwright-report/",
26+
"**/coverage/",
27+
"**/.vscode/",
28+
]),
29+
js.configs.recommended,
30+
tseslint.configs.recommended,
31+
{
32+
languageOptions: {
33+
globals: {
34+
...globals.browser,
35+
...globals.node,
36+
...globals.worker,
37+
...globals.serviceworker,
38+
},
39+
40+
parser: tsParser,
41+
ecmaVersion: "latest",
42+
sourceType: "module",
43+
44+
parserOptions: {
45+
ecmaFeatures: {
46+
jsx: true,
47+
},
48+
49+
project: "./tsconfig.json",
50+
},
51+
},
52+
53+
rules: {
54+
"react-hooks/rules-of-hooks": "off",
55+
"react-hooks/exhaustive-deps": "off",
56+
"no-undef": "off",
57+
"no-unused-vars": "off",
58+
"quote-props": "off",
59+
"no-duplicate-imports": "error",
60+
"no-case-declarations": "off",
61+
"no-undef-init": "warn",
62+
"prefer-const": "warn",
63+
"prefer-template": "warn",
64+
"no-else-return": "warn",
65+
"no-async-promise-executor": "off",
66+
},
67+
}, {
68+
files: ["**/*.test.ts", "**/*.test.tsx", "src/__tests__/**"],
69+
}
70+
]);

0 commit comments

Comments
 (0)