🌐
npm
npmjs.com › package › eslint-plugin-jsdoc
eslint-plugin-jsdoc - npm
A plugins property can also be supplied to merge with the resulting jsdoc plugin. Other config properties such as files, ignores, etc. are also copied over, though noting that if the specified config produces an array, they will not currently function. There is also a extraRuleDefinitions.forbid option, the details of which are explained in the Advanced docs (under creating your own rules and forbidding structures). import jsdoc from 'eslint-plugin-jsdoc'; const config = [ // configuration included in plugin jsdoc.configs['flat/recommended'], // other configuration objects...
      » npm install eslint-plugin-jsdoc
    
Published   Feb 24, 2026
Version   62.7.1
Author   Gajus Kuizinas
🌐
ESLint
eslint.org › docs › latest › rules › require-jsdoc
require-jsdoc - ESLint - Pluggable JavaScript Linter
This rule was removed in ESLint v9.0.0 and replaced by the eslint-plugin-jsdoc equivalent.
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc
GitHub - gajus/eslint-plugin-jsdoc: JSDoc specific linting rules for ESLint. · GitHub
A plugins property can also be supplied to merge with the resulting jsdoc plugin. Other config properties such as files, ignores, etc. are also copied over, though noting that if the specified config produces an array, they will not currently function. There is also a extraRuleDefinitions.forbid option, the details of which are explained in the Advanced docs (under creating your own rules and forbidding structures). import jsdoc from 'eslint-plugin-jsdoc'; const config = [ // configuration included in plugin jsdoc.configs['flat/recommended'], // other configuration objects...
Author   gajus
🌐
Reddit
reddit.com › r/typescript › setting up eslint-plugin-jsdoc
r/typescript on Reddit: Setting up eslint-plugin-jsdoc
October 13, 2024 -

I'm trying to set up eslint-plugin-jsdoc to enforce JSDoc in my TS project, but for some reason the linter is not complaining at all when I don't add JSDoc above a function. My config file is as follows:

{
  "extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
  "env": {
    "node": true,
    "es6": true
  },
  "parserOptions": {
    "ecmaVersion": 2021
  },
  "plugins": ["jsdoc"],
  "rules": {
    ...
  }
}

To my (limited) knowledge, as long as I have the recommended rules, the linter should enforce JSDocs for every function. Could someone please help me understand why this isn't working? I do have both ESLint and eslint-plugin-jsdoc installed:

  "devDependencies": {
    "@eslint/js": "^9.12.0",
    "@types/eslint__js": "^8.42.3",
    "@types/node": "^22.7.4",
    "eslint": "^9.12.0",
    "eslint-plugin-jsdoc": "^50.3.2",
    "globals": "^15.11.0",
    "tsx": "^4.19.1",
    "typescript": "^5.6.3",
    "typescript-eslint": "^8.8.1"
  }
🌐
ESLint
eslint.org › docs › latest › use › configure › migration-guide
Configuration Migration Guide - ESLint - Pluggable JavaScript Linter
// eslint.config.js import { defineConfig } from "eslint/config"; import jsdoc from "eslint-plugin-jsdoc"; export default defineConfig([ { files: ["**/*.js"], plugins: { jsdoc: jsdoc, }, rules: { "jsdoc/require-description": "error", "jsdoc/check-values": "error", }, }, ]); 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Copy code to clipboard ... If you import a plugin and get an error such as “TypeError: context.getScope is not a function”, then that means the plugin has not yet been updated to the ESLint v9.x rule API. While you should file an issue with the particular plugin, you can manually patch the plugin to work in ESLint v9.x using the compatibility utilities.
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › releases
Releases · gajus/eslint-plugin-jsdoc
default-expressions and examples configs: avoid applying deprecated rules now that ESLint warns against them; fixes #1651 (a252868) ... There was an error while loading. Please reload this page. ... There was an error while loading. Please reload this page. ... There was an error while loading. Please reload this page. ... There was an error while loading. Please reload this page. ... require-template: stop treating type parameters names as unknown template names; fixes #1648 (dfc662e) type-formatting: update jsdoccomment and devDeps.; fixes #1647 (19f36b6)
Author   gajus
🌐
jsDocs.io
jsdocs.io › package › eslint-plugin-jsdoc
eslint-plugin-jsdoc@62.7.1 - jsDocs.io
JSDoc linting rules for ESLint. ... {"recommended" | "stylistic" | "contents" | "logical" | "requirements"} ConfigGroups {"" | "-typescript" | "-typescript-flavor"} ConfigVariants {"" | "-error"} ErrorLevelVariants {import('eslint').ESLint.Plugin & { configs: Record< flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}, import('eslint').Linter.Config > & Record< "examples"|"default-expressions"|"examples-and-default-expressions", import('eslint').Linter.Config[] > & Record<"flat/recommended-mixed", import('eslint').Linter.Config[]> }}
🌐
Npmpeer
npmpeer.dev › packages › eslint-plugin-jsdoc › compatibility
eslint-plugin-jsdoc versions and peer dependencies
The table below has a list of all versions of eslint-plugin-jsdoc with compatible (peer) dependencies.
🌐
TypeScript Analyzer
rich-newman.github.io › typescript-analyzer-eslint-prettier › setupjsdoc.html
Set Up for JSDoc Plugin | TypeScript Analyzer (ESLint, Prettier)
On the Tools/Options/TypeScript Analyzer/ESLint screen, check that both ‘Enable local config (.eslintrc.js)’ and ‘Enable local node_modules’ are set to True, which is the default. Test the rules work. Open app.js, and replace the code with the code below. This is taken from the plugin docs, and is the first example of code that fails with the plugin enabled. ... You should get a jsdoc/check-access warning ‘Missing valid JSDoc @access level’ in the Error List, along with other errors and warnings.
🌐
ESLint
eslint.org › blog › 2018 › 11 › jsdoc-end-of-life
End-of-Life for Built-in JSDoc Support in ESLint - ESLint - Pluggable JavaScript Linter
As part of a recent review, we've decided to end-of-life the built-in support for JSDoc in the ESLint project.
Find elsewhere
Top answer
1 of 1
3

Firstly, I should note that eslint-plugin-jsdoc's rules are incremental. If you don't have any jsdoc block at all, you first need to add the jsdoc/require-jsdoc rule so it will complain unless you have at least something like:

Copy/**
 *
 */

...above your structure of interest. In your case, you do have "recommended" which includes this rule, so you're covered there.

Similarly, the rules like require-property-description or require-property-name will only work if you already have a @property on a given block.

Secondly, the require-property rule has a different purpose than what you are trying to do. It is instead used to report that a @property is present when a jsdoc block has a @namespace tag (used for plain objects) or a @typedef tag (used for defining types).

JSDoc does indicate the tag can be used for the static properties of classes, so the eslint-plugin-jsdoc project could in theory adapt the rule to check for consistency between any @property tags in a jsdoc block above the class and those properties used within the class, but I'm not sure how popular this would be given that most projects seem to prefer adding the docs in the manner in your example (i.e., above the properties themselves).

You could use require-property, along with the other require-property-* rules too if you used the @property tag right above your properties, but I wouldn't think you would really want that, especially since I'm not sure how documentation tools treat @property in this context--it seems from the TypeScript docs that @type is used instead--to check that @type has a curly-bracketed type, use jsdoc/valid-types and you could use jsdoc/match-description to indicate that the tag should have a description or use jsdoc/require-description so as to enforce a description above the tag, using either of these two description-related rules' contexts option with ClassProperty inside since they don't check properties by default).

But to finally get back to the most important part of what you need, you will want to use jsdoc/require-jsdoc. However, by default require-jsdoc only checks for FunctionDeclaration, i.e., for regular function declarations, but you can use the require or contexts option for more precise control, i.e., in your case you could add {contexts: ['ClassProperty']}.

🌐
ESLint
eslint.org › docs › latest › rules › valid-jsdoc
valid-jsdoc - ESLint - Pluggable JavaScript Linter
Note: This rule does not support all of the Google Closure documentation tool’s use cases. As such, some code such as (/**number*/ n => n * 2); will be flagged as missing appropriate function JSDoc comments even though /**number*/ is intended to be a type hint and not a documentation block for the function.
🌐
DEV Community
dev.to › thejaredwilcurt › comment › 1of4e
Everything TS is trying to do is done better with eslint-plugin-jsdoc. It let... - DEV Community
JSDocs - No learning curve just do eslint --fix and it starts writing the comment block for you. You fill in the details, run eslint --fix again and it corrects your formatting and tells you what you missed.
🌐
UNPKG
unpkg.com › browse › eslint-plugin-jsdoc@35.1.3 › README.md
eslint-plugin-jsdoc
JSDoc linting rules for ESLint. ... <a name="eslint-plugin-jsdoc"></a> # eslint-plugin-jsdoc [![GitSpo Mentions](https://gitspo.com/badges/mentions/gajus/eslint-plugin-jsdoc?style=flat-square)](https://gitspo.com/mentions/gajus/eslint-plugin-jsdoc) [![NPM version](https://img.shields.io/npm/v/eslint-plugin-jsdoc.svg?style=flat-square)](https://www.npmjs.org/package/eslint-plugin-jsdoc) [![Travis build status](https://img.shields.io/travis/gajus/eslint-plugin-jsdoc/master.svg?style=flat-square)](https://travis-ci.org/gajus/eslint-plugin-jsdoc) [![js-canonical-style](https://img.shields.io/badge/code style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical) [![Discord Chat](https://img.shields.io/badge/chat-on disord-green.svg?logo=discord)](https://discord.gg/kFFy3nc) JSDoc linting rules for ESLint.
🌐
ESLint
eslint.org › docs › latest › use › migrate-to-9.0.0
Migrate to v9.x - ESLint - Pluggable JavaScript Linter
The require-jsdoc and valid-jsdoc rules have been removed in ESLint v9.0.0. These rules were initially deprecated in 2018. To address: Use the replacement rules in eslint-plugin-jsdoc.
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › blob › main › docs › rules › informative-docs.md
eslint-plugin-jsdoc/docs/rules/informative-docs.md at main · gajus/eslint-plugin-jsdoc
JSDoc specific linting rules for ESLint. Contribute to gajus/eslint-plugin-jsdoc development by creating an account on GitHub.
Author   gajus
🌐
johnnyreilly
johnnyreilly.com › home › blog › typescript-eslint with jsdoc javascript
typescript-eslint with JSDoc JavaScript | johnnyreilly
September 2, 2024 - In general, this is because the syntax required to satisfy the rule is not compatible with JS / JSDoc. In this post we've set up a JavaScript project to be type checked with JSDoc and the TypeScript compiler.
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › issues
gajus/eslint-plugin-jsdoc
jsdoc-pratt-parser-blocked · Status: Open. #1615 In gajus/eslint-plugin-jsdoc; · alexander-akait opened · on Dec 15, 2025 · chore · Status: Open. #1578 In gajus/eslint-plugin-jsdoc; · Cevan00 opened · on Oct 22, 2025 · bug · help wanted · Status: Open.
Author   gajus
🌐
Npm
npm.io › package › eslint-plugin-jsdoc
Eslint-plugin-jsdoc NPM | npm.io
If you have installed ESLint globally, you have to install JSDoc plugin globally too.