{"id":19807,"library":"eslint-plugin-jsdoc","title":"eslint-plugin-jsdoc","description":"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.","status":"active","version":"62.9.0","language":"javascript","source_language":"en","source_url":"https://github.com/gajus/eslint-plugin-jsdoc","tags":["javascript","eslint","plugin","jsdoc","typescript"],"install":[{"cmd":"npm install eslint-plugin-jsdoc","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-jsdoc","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-jsdoc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency – the plugin integrates with ESLint as a plugin.","package":"eslint","optional":false}],"imports":[{"note":"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.","wrong":"const { jsdoc } = require('eslint-plugin-jsdoc')","symbol":"jsdoc","correct":"import { jsdoc } from 'eslint-plugin-jsdoc'"},{"note":"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.","wrong":"const plugin = require('eslint-plugin-jsdoc')","symbol":"plugin","correct":"import plugin from 'eslint-plugin-jsdoc'"},{"note":"The recommended config is accessed by passing `config: 'flat/recommended'` to the `jsdoc()` function, not as a separate export.","wrong":"import { recommended } from 'eslint-plugin-jsdoc'","symbol":"flat/recommended","correct":"import { jsdoc } from 'eslint-plugin-jsdoc'; export default [ jsdoc({ config: 'flat/recommended' }) ]"}],"quickstart":{"code":"import { jsdoc } from 'eslint-plugin-jsdoc';\n\nexport default [\n  jsdoc({\n    config: 'flat/recommended',\n    rules: {\n      'jsdoc/require-description': 'warn',\n      'jsdoc/check-param-names': ['error', { checkRestProperty: true }]\n    },\n    settings: {\n      // Custom tag definitions\n      structuredTags: {\n        customTag: {\n          name: 'text',\n          type: false,\n          required: ['name']\n        }\n      }\n    }\n  })\n];","lang":"typescript","description":"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."},"warnings":[{"fix":"Upgrade to eslint-plugin-jsdoc >=62.7.0 to use ESLint 10.","message":"ESLint 10 support added in v62.7.0; v62.6.x may not be compatible with ESLint 10.","severity":"breaking","affected_versions":"<62.7.0"},{"fix":"Migrate to flat config using `jsdoc({ config: 'flat/recommended' })`.","message":"Flat config is the only supported config format for ESLint 9+. eslintrc configs are deprecated and may be removed in a future major.","severity":"breaking","affected_versions":">=62.0.0"},{"fix":"Avoid using those configs; configure individual rules instead.","message":"The `default-expressions` and `examples` configs use deprecated rules that now trigger ESLint warnings.","severity":"deprecated","affected_versions":">=62.5.3"},{"fix":"Set settings at top level of the config object, not under `settings.jsdoc`.","message":"When using `jsdoc()` in flat config, do not nest settings under a `jsdoc` key; pass them directly. Merging is recursive by default unless `mergeSettings: false`.","severity":"gotcha","affected_versions":">=62.0.0"},{"fix":"Upgrade to v62.5.5 or later to support TSPropertySignature inside interfaces.","message":"The `check-param-names` rule may not correctly check TypeScript property signatures in interfaces prior to v62.5.5.","severity":"gotcha","affected_versions":"<62.5.5"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-plugin-jsdoc`.","cause":"The package is not installed or is listed in devDependencies but not installed.","error":"Cannot find module 'eslint-plugin-jsdoc'"},{"fix":"Correct usage: `jsdoc({ config: 'flat/recommended' })`","cause":"Using the config string without the `config` property or misspelling the config name.","error":"Error: Invalid config: 'flat/recommended' is not a valid config name."},{"fix":"Use `import { jsdoc } from 'eslint-plugin-jsdoc'` and call `jsdoc(options)`.","cause":"Importing the plugin incorrectly (e.g., import * as jsdocPlugin from 'eslint-plugin-jsdoc' and trying to call it).","error":"TypeError: jsdoc is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}