Registry / devops / eslint-doc-generator

eslint-doc-generator

JSON →
library3.3.2jsnpmunverified

Automatic documentation generator for ESLint plugins and rules v3.3.2 (stable, monthly releases). Generates README rules/configs tables, rule doc titles, notices, and option lists from rule metadata. Key differentiator: eliminates custom documentation scripts and tests by providing a single CLI tool that enforces consistent documentation conventions across ESLint plugins. Supports configurable output formats, badges, emoji suggestions (including AI-powered), and integration with prettier/markdownlint. Ships TypeScript declarations.

npm install eslint-doc-generator
INSTALL
IMPORT
SIG · ESLINT-DOC-GENERAT
E
eslint-doc-generator
devopsjavascriptv3.3.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import eslintDocGenerator from 'eslint-doc-generator'
✗ const eslintDocGenerator = require('eslint-doc-generator')
ESM-only since v3 (minimum Node 20). No CommonJS support.
generate
✓ import { generate } from 'eslint-doc-generator'
✗ const { generate } = require('eslint-doc-generator')
Named export for programmatic use. ESM only.
ESLintDocGeneratorOptions
✓ import type { ESLintDocGeneratorOptions } from 'eslint-doc-generator'
✗ import { ESLintDocGeneratorOptions } from 'eslint-doc-generator'
Type-only import for TypeScript; do not import at runtime.

Shows programmatic usage via generate() with common options and CLI fallback.

// Install: npm i --save-dev eslint-doc-generator eslint prettier // ESM usage: import { generate } from 'eslint-doc-generator'; // CLI (programmatic): await generate({ cwd: process.cwd(), check: false, configFormat: 'name', ruleDocTitleFormat: 'desc', suggestEmojis: false, }); // The CLI also supports direct invocation: eslint-doc-generator --check console.log('Documentation updated successfully.');
eslint-doc-generator --version
Debug
Known issues
breakingv3.0.0 removed implicit config badge fallback. Configs without an explicit badge now show no badge instead of a fallback.
fix
Add explicit badge definitions for each config in your configuration file or use --config-badge flag.
affects: >=3.0.0
breakingv3.0.0 dropped support for Node.js <20, <22.13.0 (for 22.x), and <24. Node 18 and below are no longer supported.
fix
Upgrade to Node.js 20, 22.13.0+, or 24+. Run `nvm install 22` or update your CI Node version.
affects: >=3.0.0
breakingv3.0.0 updated default rule doc title format from 'desc-name' to 'desc' (no rule name in title). Notices formatting changed.
fix
Run `eslint-doc-generator` to regenerate rule docs. If you prefer the old format, use `--rule-doc-title-format desc-name`.
affects: >=3.0.0
breakingv3.3.0 introduced support for new `DeprecatedInfo` format for rule meta.deprecated. Docs may display deprecation info differently.
fix
Ensure rule meta.deprecated follows the new format (object with `message` and `replacedBy`). If using old flat string, update rules.
affects: >=3.3.0
deprecatedv3.0.0 removed the `--config-badge` implicit fallback. The `--config-format` option no longer supports `'ruleCount'` (removed in v2).
fix
Use `--config-badge` with explicit badge names, or omit to get no badge. For rule count, use `--config-format name` (no count).
affects: >=3.0.0
gotchaThe tool modifies files in-place. If run with `--check`, it exits with non-zero if docs are outdated, which is intended for CI but may confuse first-time users.
fix
Always run `eslint-doc-generator` without `--check` to regenerate docs, then commit. Use `--check` only in CI to catch staleness.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-doc-generator'
Package not installed or not in node_modules.
fix
Run `npm install eslint-doc-generator --save-dev` and ensure dependencies are installed.
Error: The "path" argument must be of type string. Received undefined
Missing `cwd` option when calling generate() programmatically.
fix
Pass a valid directory: `await generate({ cwd: process.cwd() })`.
error: Cannot find module 'prettier'
Optional peer dependency prettier is missing but required for formatting.
fix
Install prettier: `npm install prettier --save-dev` or set `--no-prettier` if using a different formatter.
SyntaxError: Invalid or unexpected token (when using require)
The package is ESM-only since v3; require() is not supported.
fix
Use `import` syntax or switch to dynamic `import('eslint-doc-generator')`. Upgrade Node to >=20.
Upgrade
Version history
3.3.2latest on npm
Audit
Dependencies
eslintrequiredPlugin must be installed alongside the tool; used to load rules and configs
prettieroptionalOptional peer dependency for formatted output (line-ending detection)
Agent activity
4 hits · last 30 days
node
4
Resources