chore: add pre-commit hooks, tighten ESLint, activate Sentry DSN, publish CI coverage (Phase 1)

- Install husky v9 + lint-staged: pre-commit runs eslint --fix and prettier on staged files
- Tighten ESLint base config: no-console→error, ban-ts-comment (ts-ignore banned, ts-expect-error with description allowed), reportUnusedDisableDirectives→error
- Migrate web app from deprecated `next lint` to `eslint src/` with flat config and react-hooks plugin
- Convert all 5 @ts-ignore to @ts-expect-error with descriptions, remove stale disable comments
- Add NEXT_PUBLIC_SENTRY_DSN to docker-compose.prod.yml and .env.example
- Add coverage artifact upload step to CI test job
- Pre-existing violations (102 warnings) downgraded to warn in web config for Phase 2 cleanup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 14:49:29 +02:00
parent 605fd7cea1
commit 82acc56b8d
38 changed files with 2901 additions and 1251 deletions
+2 -1
View File
@@ -12,7 +12,8 @@
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0"
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react-hooks": "^7.0.1"
},
"peerDependencies": {
"eslint": "^9.0.0",
+10 -1
View File
@@ -15,12 +15,21 @@ export default [
project: true,
},
},
linterOptions: {
reportUnusedDisableDirectives: "error",
},
rules: {
...tsPlugin.configs["recommended"].rules,
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "error",
"no-console": ["warn", { allow: ["warn", "error"] }],
"@typescript-eslint/ban-ts-comment": ["error", {
"ts-ignore": true,
"ts-expect-error": "allow-with-description",
"ts-nocheck": true,
"ts-check": false,
}],
"no-console": ["error", { allow: ["warn", "error"] }],
},
},
prettierConfig,
+6
View File
@@ -1,10 +1,16 @@
import baseConfig from "./base.js";
import reactHooks from "eslint-plugin-react-hooks";
/** @type {import("eslint").Linter.FlatConfig[]} */
export default [
...baseConfig,
{
plugins: {
"react-hooks": reactHooks,
},
rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-misused-promises": [
"error",
{ checksVoidReturn: { attributes: false } },