Framework - Next.js
Lint Next.js applications with a Nova-compatible framework stack. The preset combines Next.js correctness and Core Web Vitals checks with React, React Hooks, and JSX accessibility rules without copying an upstream flat config wholesale.
Usage
Spread fwNextjs after the language layers. The preset provides its own plugin registration.
import {
dxCodeStyle,
dxIgnore,
fwNextjs,
langJavascript,
langTypescript,
} from '@cbnventures/nova/presets/eslint';
export default [
...dxIgnore,
...dxCodeStyle,
...langJavascript,
...langTypescript,
...fwNextjs,
];
What This Preset Configures
- Ignores
.nextbuild output and generatednext-env.d.tsfiles. - Declares Node.js globals for
next.config.*and browser globals for application code. - Registers Next.js, React, React Hooks, and JSX accessibility plugins.
- Applies Next.js recommended and Core Web Vitals rules, React's modern JSX runtime, the fundamental Rules of Hooks check, and accessibility checks.
- Disables legacy React prop-type validation for TypeScript-first applications.
Nova intentionally omits React Hooks' compiler-diagnostic bundle and exhaustive-deps. The compiler diagnostics require an explicit React Compiler migration, while exhaustive-deps rejects computed dependency expressions required by Nova's bracket-property rule. Consumers can opt into either policy after the preset when the application is designed for it.
Consumers retain normal flat-config control: append a later config object to change an individual rule.
Related
- Pair it with the matching Framework - Next.js TSConfig preset.
- Review the Next.js scaffold.