Skip to main content

Framework - Docusaurus

Lint Docusaurus sites with a Nova-compatible React stack while excluding generated framework output.

Why Use This Preset?

  1. Ignores the .docusaurus cache directory so transient framework output does not trigger lint failures.
  2. Declares Node.js globals for Docusaurus and sidebar configuration files.
  3. Declares browser globals for JSX and TSX components.
  4. Applies curated React, React Hooks, and JSX accessibility correctness rules with the modern JSX runtime.

Usage

Spread fwDocusaurus in the environment/framework slot, after the language layer and before any tool layer.

eslint.config.mts
ts
import {
  dxCodeStyle,
  dxIgnore,
  fwDocusaurus,
  langJavascript,
  langMdx,
  langTypescript,
  runtimeBrowser,
} from '@cbnventures/nova/presets/eslint';

export default [
  ...dxIgnore,
  ...dxCodeStyle,
  ...langJavascript,
  ...langMdx,
  ...langTypescript,
  ...fwDocusaurus,
  ...runtimeBrowser,
];

What This Preset Configures

The preset registers React, React Hooks, and JSX accessibility plugins for JSX and TSX files. It selects React's component checks, the fundamental Rules of Hooks check, and JSX accessibility checks, turns off legacy React prop-type validation for TypeScript projects, and lets consumers override any severity in a later flat-config block.

Nova intentionally does not enable React Hooks' compiler-diagnostic bundle or exhaustive-deps. The compiler diagnostics assume React Compiler adoption, while exhaustive-deps rejects computed dependency expressions that Nova's bracket-property rule requires. Consumers can opt into either policy in a later config block when their application is designed for it.

Ignored files

PatternExcludes
**/.docusaurus/**The Docusaurus build cache directory.

Nova deliberately does not copy an upstream framework config wholesale. The preset selects the parts that compose with Nova's language, MDX, browser, and custom-rule layers.