Skip to content

Commit fa69cee

Browse files
committed
feat: add frontend lint checks to CI
- Add ESLint config (eslint.config.js) for ESLint 9 - Add ESLint dependencies to package.json - Update CI workflow to include: - ESLint check - Prettier format check - Fix lint errors: - Remove unused catch variable in Logs.tsx - Add eslint-disable for intentional useEffect dependency - Run prettier to format all source files
1 parent d25ca66 commit fa69cee

13 files changed

Lines changed: 2079 additions & 290 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
- name: TypeScript check
6363
run: npx tsc --noEmit
6464

65+
- name: ESLint check
66+
run: npm run lint
67+
68+
- name: Prettier check
69+
run: npx prettier --check "src/**/*.{ts,tsx,css}"
70+
6571
build-check:
6672
name: Build Check
6773
runs-on: ubuntu-latest

eslint.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import js from "@eslint/js";
2+
import tseslint from "@typescript-eslint/eslint-plugin";
3+
import tsparser from "@typescript-eslint/parser";
4+
import reactHooks from "eslint-plugin-react-hooks";
5+
import reactRefresh from "eslint-plugin-react-refresh";
6+
import globals from "globals";
7+
8+
export default [
9+
{ ignores: ["dist", "src-tauri", "node_modules"] },
10+
{
11+
files: ["**/*.{ts,tsx}"],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
parser: tsparser,
16+
parserOptions: {
17+
ecmaFeatures: { jsx: true },
18+
},
19+
},
20+
plugins: {
21+
"@typescript-eslint": tseslint,
22+
"react-hooks": reactHooks,
23+
"react-refresh": reactRefresh,
24+
},
25+
rules: {
26+
...js.configs.recommended.rules,
27+
...tseslint.configs.recommended.rules,
28+
...reactHooks.configs.recommended.rules,
29+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
30+
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", caughtErrorsIgnorePattern: "^_" }],
31+
"@typescript-eslint/no-explicit-any": "off",
32+
},
33+
},
34+
];

0 commit comments

Comments
 (0)