Skip to main content

Getting Started

Install the package:

npm install --save-dev eslint-plugin-docusaurus-2 typescript

Enable a preset:

import docusaurus2 from "eslint-plugin-docusaurus-2";

export default [docusaurus2.configs.recommended];

Current preset splitโ€‹

  • recommended enables the stable Docusaurus config and sidebar rules.
  • strict, all, and experimental also add the stricter page-module and site-source CSS architecture rules.
  • minimal keeps the runtime/preset contract without enabling bundled rules.

Current file coverageโ€‹

The plugin presets now target both JavaScript and TypeScript site source files:

  • **/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}

If you want the current high-signal default, start with recommended.