Logo
  • DB
  • About
  • Updates
eslint-plugin-jsdoc

JSDoc linting rules for ESLint.

❯ npm i --save-dev eslint-plugin-jsdoc
📖 README🐛 BugsGitHub LogoGitHubnpm Logonpm
🕵️‍♂️ Linter
  • 12 Configs
  • 53 Rules
GitHub LogoGitHub
  • JavaScript
  • 985 Stars
  • 7 Watchers
npm Logonpm
  • 1M Wkly Downloads
  • +56% WoW
  • 48.0.2 1.83 MB
📋 Requirements
  • Node: >=18
  • ESLint: ^7 || ^8 || ^9
ConfigurationRules
🔴 flat/recommended30 warn • 23 off
🟠 flat/recommended-error30 error • 23 off
🟡 flat/recommended-typescript27 warn • 26 off
🟢 flat/recommended-typescript-error27 error • 26 off
🔵 flat/recommended-typescript-flavor29 warn • 24 off
🟣 flat/recommended-typescript-flavor-error29 error • 24 off
recommended30 warn • 23 off
🟤 recommended-error30 error • 23 off
recommended-typescript27 warn • 26 off
recommended-typescript-error27 error • 26 off
🟥 recommended-typescript-flavor29 warn • 24 off
🟧 recommended-typescript-flavor-error29 error • 24 off
RuleDescription🔧💡💭🗂️⚙️🔴🟠🟡🟢🔵🟣🟤🟥🟧
check-access

Checks that @access tags have a valid value.

📖⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-alignment

Reports invalid alignment of JSDoc block asterisks.

🔧📏⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-examples

Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
check-indentation

Reports invalid padding inside JSDoc blocks.

📏⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
check-line-alignment

Reports invalid alignment of JSDoc block lines.

🔧📏⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
check-param-names

Ensures that parameter names in JSDoc match those in the function declaration.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-property-names

Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-syntax

Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).

📖🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
check-tag-names

Reports invalid block tag names.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-types

Reports invalid types.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
check-values

This rule checks the values for a handful of tags: @version, @since, @license and @author.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
empty-tags

Expects specific tags to be empty of any content.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
implements-on-classes

Reports an issue with any non-constructor function using @implements.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
imports-as-dependencies

Reports if JSDoc import() statements point to a package which is not listed in dependencies or devDependencies

📖🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
informative-docs

This rule reports doc comments that only restate their attached name.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
match-description

Enforces a regular expression pattern on descriptions.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
match-name

Reports the name portion of a JSDoc tag if matching or not matching a given regular expression.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
multiline-blocks

Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
no-bad-blocks

This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.

🔧📏⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
no-blank-block-descriptions

Detects and removes extra lines of a blank block description

🔧📏🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
no-blank-blocks

Removes empty blocks with nothing but possibly line breaks

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
no-defaults

This rule reports defaults being used on the relevant portion of @param or @default.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
no-missing-syntax

Reports when certain comment structures are always expected.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
no-multi-asterisks🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
no-restricted-syntax

Reports when certain comment structures are present.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
no-types

This rule reports types being used on @param or @returns.

🔧📖⚙️🚫🚫⚠️🟢🚫🚫🚫🚫⚠️🚫🚫
no-undefined-types

Checks that types in jsdoc comments are defined.

📖⚙️⚠️🟠🚫🚫🚫🚫⚠️🟤🚫🚫🚫🚫
require-asterisk-prefix

Requires that each JSDoc line starts with an *.

🔧📏⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-description

Requires that all functions have a description.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-description-complete-sentence

Requires that block description, explicit @description, and @param/@returns tag descriptions are written in complete sentences.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-example

Requires that all functions have examples.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-file-overview

Checks that all files have one @file, @fileoverview, or @overview tag at the beginning of the file.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-hyphen-before-param-description

Requires a hyphen before the @param description.

🔧📏⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-jsdoc

Require JSDoc comments

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-param

Requires that all function parameters are documented.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-param-description

Requires that each @param tag has a description value.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-param-name

Requires that all function parameters have names.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-param-type

Requires that each @param tag has a type value.

🔧📖⚙️⚠️🟠🚫🚫⚠️🟣⚠️🟤🚫🚫⚠️🟧
require-property

Requires that all @typedef and @namespace tags have @property when their type is a plain object, Object, or PlainObject.

🔧📖⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-property-description

Requires that each @property tag has a description value.

📖⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-property-name

Requires that all function @property tags have names.

📖⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-property-type

Requires that each @property tag has a type value.

📖⚠️🟠🚫🚫⚠️🟣⚠️🟤🚫🚫⚠️🟧
require-returns

Requires that returns are documented.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-returns-check

Requires a return statement in function body if a @returns tag is specified in jsdoc comment.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-returns-description

Requires that the @returns tag has a description value.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-returns-type

Requires that @returns tag has type value.

📖⚙️⚠️🟠🚫🚫⚠️🟣⚠️🟤🚫🚫⚠️🟧
require-throws

Requires that throw statements are documented.

📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
require-yields

Requires yields are documented.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
require-yields-check

Requires a yield statement in function body if a @yields tag is specified in jsdoc comment.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
sort-tags

Sorts tags by a specified sequence according to tag name.

🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
tag-lines

Enforces lines (or no lines) between tags.

🔧📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
text-escaping🔧📖⚙️🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫🚫
valid-types

Requires all types to be valid JSDoc or Closure compiler types without syntax errors.

📖⚙️⚠️🟠⚠️🟢⚠️🟣⚠️🟤⚠️⚠️🟧
© 2024 Lintbase