🌐
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
🌐
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
🌐
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[]> }}
🌐
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"
  }
🌐
TypeScript Analyzer
rich-newman.github.io › typescript-analyzer-eslint-prettier › setupjsdoc.html
Set Up for JSDoc Plugin | TypeScript Analyzer (ESLint, Prettier)
If there is one there already you need to update it as below. If the package.json contains an empty eslintConfig section you can remove this entire section. The dependencies below are those that the TypeScript Analyzer needs locally, plus the new plugin, eslint-plugin-jsdoc:
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › releases
Releases · 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
🌐
Socket
socket.dev › npm › package › eslint-plugin-jsdoc
eslint-plugin-jsdoc - npm Package Security Analysis - Socket
It reads TypeScript source files and JSDoc comments to produce documentation. While eslint-plugin-jsdoc focuses on linting JSDoc comments, TypeDoc uses them to generate documentation websites or markdown files.
🌐
ESLint
eslint.org › docs › latest › rules › require-jsdoc
require-jsdoc - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
🌐
UNPKG
unpkg.com › browse › eslint-plugin-jsdoc@32.3.0 › README.md
eslint-plugin-jsdoc
```sh npm install --save-dev eslint-plugin-jsdoc ``` <a name="eslint-plugin-jsdoc-configuration"></a> ## Configuration Add `plugins` section to [.eslintrc.*](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) and specify `eslint-plugin-jsdoc` as a plugin.
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']}.

Find elsewhere
🌐
npm
npmjs.com › package › eslint-plugin-jsdoc-typescript
eslint-plugin-jsdoc-typescript - npm
This plugin adds new `jsdoc` rules specifically for using typescript with `checkJs` & jsdoc comments.. Latest version: 2.1.0, last published: 5 years ago. Start using eslint-plugin-jsdoc-typescript in your project by running `npm i ...
      » npm install eslint-plugin-jsdoc-typescript
    
Published   Jan 16, 2021
Version   2.1.0
🌐
ESLint
eslint.org › blog › 2018 › 11 › jsdoc-end-of-life
End-of-Life for Built-in JSDoc Support in ESLint - ESLint - Pluggable JavaScript Linter
With nearly 7 million weekly downloads on npm, it seemed like the best option for existing users was to end-of-life the Doctrine project rather than try to find a new maintainer. We believe a better option for an interested new maintainer would be to fork Doctrine and start fresh rather than try to take over the way Doctrine had already been maintained. We are keeping the existing JSDoc rules to give users plenty of time to transition to using eslint-plugin-jsdoc.
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › blob › main › package.json
eslint-plugin-jsdoc/package.json at main · gajus/eslint-plugin-jsdoc
"@es-joy/jsdoc-eslint-parser": "^0.27.0", "@eslint/core": "^1.1.0", "@hkdobrev/run-if-changed": "^0.6.3", "@rollup/plugin-node-resolve": "^16.0.3", "@semantic-release/commit-analyzer": "^13.0.1", "@semantic-release/github": "^12.0.3", "@semantic-release/npm": "^13.1.3", "@types/chai": "^5.2.3", "@types/debug": "^4.1.12", "@types/espree": "^10.1.0", "@types/esquery": "^1.5.4", "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@types/mocha": "^10.0.10", "@types/node": "^25.2.0", "@types/semver": "^7.7.1", "@types/spdx-exp
Author   gajus
🌐
GitHub
github.com › gajus › eslint-plugin-jsdoc › issues › 774
gajus/eslint-plugin-jsdoc
August 5, 2021 - JSDoc specific linting rules for ESLint. Contribute to gajus/eslint-plugin-jsdoc development by creating an account on GitHub.
Published   Aug 05, 2021
🌐
Yarn
yarnpkg.com › package
eslint-plugin-jsdoc
Yarn is a package manager that doubles down as project manager. Whether you work on simple projects or industry monorepos, whether you're an open source developer or an enterprise user, Yarn has your back · First package manager built specifically ...
🌐
Stack Overflow
stackoverflow.com › questions › 76561691 › issue-with-eslint
npm - Issue with ESLint - Stack Overflow
eslint-plugin-jsdoc v44 requires Node 16 or greater: https://github.com/gajus/eslint-plugin-jsdoc/blob/94cb599304682c901994bf4966453b79bb984613/package.json#L65
🌐
Snyk
security.snyk.io › snyk vulnerability database › npm
eslint-plugin-jsdoc vulnerabilities | Snyk
We found that eslint-plugin-jsdoc demonstrates a positive version release cadence with at least one new version released in the past 3 months. As a healthy sign for on-going project maintenance, we found that the GitHub repository had at least 1 pull request or issue interacted with by the community. ... The npm package eslint-plugin-jsdoc receives a total of 3,614,374 downloads a week.
🌐
ESLint
eslint.org › docs › latest › rules › valid-jsdoc
valid-jsdoc - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
🌐
Npm
npm.io › package › eslint-plugin-jsdoc
Eslint-plugin-jsdoc NPM | npm.io
Problems reported by rules which have a wrench :wrench: below can be fixed automatically by running ESLint on the command line with --fix option. Note that a number of fixable rules have an enableFixer option which can be set to false to disable the fixer (or in the case of check-param-names, check-property-names, and no-blank-blocks, set to true to enable a non-default-recommended fixer). ... @es-joy/jsdoccommentare-docs-informativecomment-parserdebugescape-string-regexpespreeesqueryparse-importssemverspdx-expression-parsesynckit