-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy patheslint.config.mjs
More file actions
32 lines (30 loc) · 1.01 KB
/
eslint.config.mjs
File metadata and controls
32 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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/**",
".source/**",
"next-env.d.ts",
// Reference directory — not part of the project
".worldmonitor-ref/**",
]),
{
rules: {
// Downgrade to warnings — these patterns (Date.now() in useMemo, setState in
// hydration effects) are widespread and generally safe in this codebase.
"react-hooks/purity": "warn",
"react-hooks/set-state-in-effect": "warn",
// Sync ref updates in render (ref.current = value) are a common pattern for
// keeping event handler refs up-to-date. Downgrade to warning.
"react-hooks/refs": "warn",
},
},
]);
export default eslintConfig;