Corp/frontend/eslint.config.mjs

34 lines
1.1 KiB
JavaScript

import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
// Copied verbatim from pdfjs-dist during postinstall.
"public/pdf.worker.min.mjs",
]),
{
rules: {
// These React Compiler diagnostics are migration signals for the existing
// application. Keep them visible without making the conventional lint
// command fail while the compiler itself is not enabled.
"react-hooks/immutability": "warn",
"react-hooks/preserve-manual-memoization": "warn",
"react-hooks/refs": "warn",
"react-hooks/set-state-in-effect": "warn",
// Existing document integrations still expose untyped third-party data.
"@typescript-eslint/no-explicit-any": "warn",
},
},
]);
export default eslintConfig;