jsdoc/check-template-names
eslint-plugin-jsdoc
No autofix
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-template-names": "error",
},
},
];Checks that any @template names are actually used in the connected @typedef or type alias.
/**
* @template T
* @template {keyof T} K
* @param {string} x
* @returns {void}
*/
function quux (x) {}/**
* @template D
* @template V
*/
export type Pairs<D, V> = [D, V | undefined];Examples from the ESLint documentation.
jsdoc/check-template-names
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-template-names": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
Reports if JSDoc import() statements point to a package which is not listed in dependencies or devDependencies
Reports invalid alignment of JSDoc block lines.
This rule reports doc comments that only restate their attached name.
This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.