jsdoc/require-param-type
eslint-plugin-jsdoc
Safe autofixRecommended
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-param-type": "error",
},
},
];Requires that each @param tag has a type value (in curly brackets).
/**
* @param foo
*/
function quux (foo) {/**
*
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/require-param-type
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-param-type": "error",
},
},
];jsdoc/require-param-type
jsdoc plugin · pedantic
{
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/require-param-type": "error"
}
}Biome does not have this rule.
Checks for presence of JSDoc comments, on functions and potentially other contexts (optionally limited to exports).
Requires that @returns tag has type value (in curly brackets).
Requires that returns are documented with @returns.
Besides some expected built-in types, prohibits any types not specified as globals or within @typedef.
Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings).