jsdoc/no-types
eslint-plugin-jsdoc
Safe autofix
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-types": "error",
},
},
];This rule reports types being used on @param or @returns (redundant with TypeScript).
/**
* @param {number} foo
*/
function quux (foo) {/**
* @param foo
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/no-types
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-types": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Removes empty blocks with nothing but possibly line breaks
Requires a description for @throws tags
Requires a description for @yields tags
Reports invalid alignment of JSDoc block lines.
Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).