Skip to content

jsdoc/require-param Pedantic ​

What it does ​

Requires that all function parameters are documented with JSDoc @param tags.

Why is this bad? ​

The rule is aimed at enforcing code quality and maintainability by requiring that all function parameters are documented.

Examples ​

Examples of incorrect code for this rule:

javascript
/** @param foo */
function quux(foo, bar) {}

Examples of correct code for this rule:

javascript
/** @param foo */
function quux(foo) {}

How to use ​

To enable this rule in the CLI or using the config file, you can use:

bash
oxlint --deny jsdoc/require-param --jsdoc-plugin
json
{
  "plugins": ["jsdoc"],
  "rules": {
    "jsdoc/require-param": "error"
  }
}

References ​

Released under the MIT License.