jsdoc/require-template-description Style
What it does
Requires a description for @template tags.
Why is this bad?
A description explains how the generic type parameter is used by the API.
Examples
Examples of incorrect code for this rule:
js
/** @template T */
function identity(value) {
return value;
}Examples of correct code for this rule:
js
/** @template T The type of the value. */
function identity(value) {
return value;
}How to use
To enable this rule using the config file or in the CLI, you can use:
json
{
"plugins": ["jsdoc"],
"rules": {
"jsdoc/require-template-description": "error"
}
}ts
import { defineConfig } from "oxlint";
export default defineConfig({
plugins: ["jsdoc"],
rules: {
"jsdoc/require-template-description": "error",
},
});bash
oxlint --deny jsdoc/require-template-description --jsdoc-pluginVersion
This rule was added in vnext.
