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:
@@ -0,0 +1,30 @@
|
||||
import nextjsConfig from "@capakraken/eslint-config/nextjs";
|
||||
|
||||
/** @type {import("eslint").Linter.FlatConfig[]} */
|
||||
export default [
|
||||
...nextjsConfig,
|
||||
{
|
||||
ignores: ["e2e/**"],
|
||||
},
|
||||
{
|
||||
// Temporary overrides for pre-existing violations surfaced by switching
|
||||
// from `next lint` to the shared eslint config. Each rule should be
|
||||
// upgraded back to "error" as the violations are resolved:
|
||||
// - no-explicit-any: Phase 2 (reduce `as any` casts)
|
||||
// - no-unused-vars: Phase 2 (remove dead code)
|
||||
// - no-misused-promises: Phase 2 (fix async event handlers)
|
||||
// - no-unsafe-function-type: Phase 2 (replace `Function` type)
|
||||
// - no-unused-expressions: Phase 2
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
||||
"@typescript-eslint/no-misused-promises": "warn",
|
||||
"@typescript-eslint/no-unsafe-function-type": "warn",
|
||||
"@typescript-eslint/no-unused-expressions": "warn",
|
||||
"@typescript-eslint/consistent-type-imports": ["error", {
|
||||
fixStyle: "separate-type-imports",
|
||||
disallowTypeAnnotations: false,
|
||||
}],
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user