1. eslint-plugin-require-jsdoc-except
A modified version of the built-in eslint rule require-jsdoc that allows you to exclude certain methods from requiring a JSDoc.
eslint-plugin-require-jsdoc-except
Package: eslint-plugin-require-jsdoc-except
Created by: MaienM
Last modified: Sun, 01 May 2022 16:52:30 GMT
Version: 1.5.0
License: MIT
Downloads: 1,349
Repository: https://github.com/MaienM/eslint-plugin-require-jsdoc-except

Install

npm install eslint-plugin-require-jsdoc-except
yarn add eslint-plugin-require-jsdoc-except

eslint-plugin-require-jsdoc-except

This is a modified version of the built-in eslint rule require-jsdoc that
allows you to exclude certain methods from requiring a JSDoc.

The rationale is that when using a framework such as React, there will be certain recurring method about which no useful
docs can be made. There is no real point in describing each render method as "Renders the component", and any more than
that will often just be a duplication of the component's JSDoc.

Installation

You'll first need to install ESLint:

npm install eslint --save-dev

Next, install eslint-plugin-require-jsdoc-except:

npm install eslint-plugin-require-jsdoc-except --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install
eslint-plugin-require-jsdoc-except globally.

Usage

Add require-jsdoc-except to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

 {
	"plugins": [
		"require-jsdoc-except"
	]
}

Then configure the rule. The main usage is as the built-in eslint rule
require-jsdoc. In addition, this plugin adds a second option to the
option object: ignore. This accepts a list of names for which the JSDoc requirement should not be enforced.

The following example would require all named functions to be documented, except for class constructors (or other
functions named constructor).

 {
    "rules": {
        "require-jsdoc-except/require-jsdoc": ["error", {
            "require": {
                "FunctionDeclaration": true,
                "MethodDefinition": true,
                "ClassDeclaration": true,
                "ArrowFunctionExpression": true,
                "FunctionExpression": true
            },
            "ignore": ["constructor"],
        }],
    }
}

NOTE: You may also need to disable the old require-jsdoc, as this will essentially replace it. If you do not, then
both rules will be running at the same time.

{
    "rules": {
        "require-jsdoc": "off",
    }
}

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code