82acc56b8d
- 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>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
import prettierConfig from "eslint-config-prettier";
|
|
|
|
/** @type {import("eslint").Linter.FlatConfig[]} */
|
|
export default [
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
plugins: {
|
|
"@typescript-eslint": tsPlugin,
|
|
},
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
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",
|
|
"@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,
|
|
];
|