Skip to content

check-template-names reports on @template names that are not a single capital letter #1352

@RobertAKARobin

Description

@RobertAKARobin

ESLint sample

/**
 * @template Input
 * @param {Input} input
 * @returns {Input}
 */
function echo(input) {
	return input;
}

const myString = echo(`hello`);
const myNum = echo(32);

Expected behavior

Expected no errors.

Actual behavior

check-template-names reports:

@template Input is not in use

ESLint Config

import jsdoc from 'eslint-plugin-jsdoc';

export default [
	{
		files: [`**/*.js`],
		plugins: {
			jsdoc,
		},
		rules: {
			'jsdoc/check-template-names': `error`,
		},
	},
];

Environment

  • Node version: 23.6.0
  • ESLint version 9.19.0
  • eslint-plugin-jsdoc version: 50.6.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions