Framework - React
Lint React applications with a Nova-compatible framework layer instead of composing the upstream plugin configs directly.
Why Use This Preset?
- Enables React component correctness, the Rules of Hooks, and recommended JSX accessibility checks.
- Selects the modern JSX runtime, so components do not need legacy React imports.
- Declares browser globals for React source files while leaving language and repository policy to separate Nova layers.
- Disables runtime prop-type validation for TypeScript projects and keeps every rule open to later consumer overrides.
Usage
Spread fwReact after the language and browser layers and before novaRules.
eslint.config.mts
import {
dxCodeStyle,
dxIgnore,
fwReact,
langJavascript,
langTypescript,
runtimeBrowser,
toolVite,
} from '@cbnventures/nova/presets/eslint';
import { novaRules } from '@cbnventures/nova/rules/eslint';
export default [
...dxIgnore,
...dxCodeStyle,
...langJavascript,
...langTypescript,
...runtimeBrowser,
...toolVite,
...fwReact,
...novaRules,
];
Nova deliberately does not enable React Hooks' compiler-diagnostic bundle or exhaustive-deps. Consumers can opt into those policies in a later config block when their application is designed for them.
Related
- Pair it with the matching Framework - React TSConfig preset.
- Select it automatically with the Vite scaffold and
--framework react. - Review the layering order in ESLint Best Practices.