Registry / testing / eslint-plugin-jsdoc

eslint-plugin-jsdoc

JSON →
library62.9.0jsnpmunverified

An ESLint plugin providing over 80 JSDoc linting rules, including checks for tag presence, type correctness, param consistency, and comment formatting. At version 62.9.0, it supports ESLint 7–10 and ships TypeScript types. It offers flat config (recommended) and eslintrc configs, with a dedicated TSDoc ruleset. Compared to alternatives like eslint-plugin-require-jsdoc, it is the most comprehensive and actively maintained JSDoc linter, with a monthly release cadence and strong community adoption.

npm install eslint-plugin-jsdoc
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-JSDO
E
eslint-plugin-jsdoc
testingjavascriptv62.9.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

jsdoc
import { jsdoc } from 'eslint-plugin-jsdoc'
const { jsdoc } = require('eslint-plugin-jsdoc')
The plugin exports a `jsdoc` named function, not a default export. In flat config, always import `{ jsdoc }`; using require may still work but is not recommended for ESM.
plugin
import plugin from 'eslint-plugin-jsdoc'
const plugin = require('eslint-plugin-jsdoc')
For flat configs that need the raw plugin object (or for legacy use), import the default export. In eslintrc configs, set `plugins: ['jsdoc']` which auto-resolves.
flat/recommended
import { jsdoc } from 'eslint-plugin-jsdoc'; export default [ jsdoc({ config: 'flat/recommended' }) ]
import { recommended } from 'eslint-plugin-jsdoc'
The recommended config is accessed by passing `config: 'flat/recommended'` to the `jsdoc()` function, not as a separate export.

Shows how to set up eslint-plugin-jsdoc using flat config, with a recommended ruleset and custom settings. Includes a custom rule override and structured tag settings.

import { jsdoc } from 'eslint-plugin-jsdoc'; export default [ jsdoc({ config: 'flat/recommended', rules: { 'jsdoc/require-description': 'warn', 'jsdoc/check-param-names': ['error', { checkRestProperty: true }] }, settings: { // Custom tag definitions structuredTags: { customTag: { name: 'text', type: false, required: ['name'] } } } }) ];
Debug
Known issues
breakingESLint 10 support added in v62.7.0; v62.6.x may not be compatible with ESLint 10.
fix
Upgrade to eslint-plugin-jsdoc >=62.7.0 to use ESLint 10.
affects: <62.7.0
breakingFlat config is the only supported config format for ESLint 9+. eslintrc configs are deprecated and may be removed in a future major.
fix
Migrate to flat config using `jsdoc({ config: 'flat/recommended' })`.
affects: >=62.0.0
deprecatedThe `default-expressions` and `examples` configs use deprecated rules that now trigger ESLint warnings.
fix
Avoid using those configs; configure individual rules instead.
affects: >=62.5.3
gotchaWhen using `jsdoc()` in flat config, do not nest settings under a `jsdoc` key; pass them directly. Merging is recursive by default unless `mergeSettings: false`.
fix
Set settings at top level of the config object, not under `settings.jsdoc`.
affects: >=62.0.0
gotchaThe `check-param-names` rule may not correctly check TypeScript property signatures in interfaces prior to v62.5.5.
fix
Upgrade to v62.5.5 or later to support TSPropertySignature inside interfaces.
affects: <62.5.5
Errors
Common errors & fixes
Cannot find module 'eslint-plugin-jsdoc'
The package is not installed or is listed in devDependencies but not installed.
fix
Run `npm install --save-dev eslint-plugin-jsdoc`.
Error: Invalid config: 'flat/recommended' is not a valid config name.
Using the config string without the `config` property or misspelling the config name.
fix
Correct usage: `jsdoc({ config: 'flat/recommended' })`
TypeError: jsdoc is not a function
Importing the plugin incorrectly (e.g., import * as jsdocPlugin from 'eslint-plugin-jsdoc' and trying to call it).
fix
Use `import { jsdoc } from 'eslint-plugin-jsdoc'` and call `jsdoc(options)`.
Upgrade
Version history
62.9.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency – the plugin integrates with ESLint as a plugin.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-jsdoc — npm install eslint-plugin-jsdoc · libregistry