Contributing to eslint-plugin-docusaurus-2
April 7, 2026 · View on GitHub
Thanks for contributing.
This repository is building an ESLint plugin focused on Docusaurus sites, documentation repositories, and TypeDoc-integrated docs workflows.
Core expectations
- do not add generic placeholder rules copied from other plugins
- keep rule docs hand-authored and specific
- preserve the Flat Config preset surface
- keep generated API output and authored docs separate
- prefer safe autofixes and explicit tests
Local setup
npm install
npm run build
npm run typecheck
npm run test
npm run lint:all:fix:quiet
Repository structure
src/– plugin runtime and internal helpersdocs/rules/– rule and preset reference docsdocs/docusaurus/– documentation site apptest/– Vitest and type-level coveragescripts/– sync and validation tooling
Adding a new rule
When the first Docusaurus-specific rules are added, each rule should include:
- a source module in
src/rules/ - public registration in
src/_internal/rules-registry.ts - authored docs in
docs/rules/ - tests in
test/ - README and preset sync updates when relevant
Documentation workflow
- update authored markdown first
- regenerate any derived tables with the sync scripts
- do not hand-edit generated API output under
docs/docusaurus/site-docs/developer/api/
Validation checklist
Before opening a PR, run:
npm run build
npm run typecheck
npm run test
npm run lint:all:fix:quiet
If you touched docs site structure, also run:
npm run docs:build