47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import { defineConfig, globalIgnores } from "eslint/config";
|
|
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
import nextTs from "eslint-config-next/typescript";
|
|
|
|
// `next lint` was removed in Next 16 — `npm run lint` runs the ESLint CLI
|
|
// against this flat config instead.
|
|
export default defineConfig([
|
|
...nextVitals,
|
|
...nextTs,
|
|
globalIgnores([
|
|
".next/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
"public/**",
|
|
".worktrees/**",
|
|
".claude/worktrees/**",
|
|
".remember/**",
|
|
"reports/**",
|
|
".superpowers/**",
|
|
"RAW_DOCS/**",
|
|
".kilo/**",
|
|
".opencode/**",
|
|
".freebuff/**",
|
|
".playwright-mcp/**",
|
|
// foreman is a standalone Ink terminal tool, not part of the Next app.
|
|
"foreman/**",
|
|
]),
|
|
{
|
|
// Node scripts and config files: CommonJS requires and loosely typed
|
|
// one-off helpers are normal here.
|
|
files: ["scripts/**", "next.config.js"],
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"],
|
|
// New React Compiler rules from eslint-config-next 16: surfaced as
|
|
// warnings until the existing effects/refs are reworked deliberately.
|
|
rules: {
|
|
"react-hooks/set-state-in-effect": "warn",
|
|
"react-hooks/refs": "warn",
|
|
},
|
|
},
|
|
]);
|