esdoc2 Lint Plugin
raw JSON → 2.0.0 verified Fri May 01 auth: no javascript
A lint plugin for esdoc2 that validates documentation comments against configured rules. Version 2.0.0 (latest 2.1.0) is the current stable release, with a low release cadence. It integrates into the esdoc2 build pipeline as a plugin, enabling lint checks on documentation output. Unlike standalone linters, it works within esdoc2's plugin system, requiring no additional tooling. Supports wildcards in manual file paths since v2.1.0.
Common errors
error Error: Cannot find module 'esdoc2-lint-plugin' ↓
cause The plugin is not installed in the project's node_modules.
fix
Run 'npm install esdoc2-lint-plugin --save-dev'.
error Error: Invalid plugin option: enabled ↓
cause Used 'enabled' instead of 'enable' in the plugin option.
fix
Change 'enabled' to 'enable' in esdoc.json.
Warnings
gotcha Option key 'enable' is often misspelled as 'enabled' ↓
fix Use 'enable' (not 'enabled') in the plugin option.
deprecated esdoc2 itself is a fork of esdoc; original esdoc is deprecated. This plugin may follow the same fate. ↓
fix Consider migrating to a more active documentation tool like TypeDoc.
Install
npm install esdoc2-lint-plugin yarn add esdoc2-lint-plugin pnpm add esdoc2-lint-plugin Imports
- esdoc2-lint-plugin wrong
{"name": "esdoc2-lint-plugin", "option": {"enable": false}}correct{"name": "esdoc2-lint-plugin"} - plugin object wrong
{"name": "esdoc2-lint-plugin", "option": {"enabled": true}}correct{"name": "esdoc2-lint-plugin", "option": {"enable": true}}
Quickstart
// Create esdoc.json
{
"source": "./src",
"destination": "./doc",
"plugins": [
{"name": "esdoc2-lint-plugin", "option": {"enable": true}}
]
}
// Run esdoc2
npx esdoc2