jsdoc/no-defaults
eslint-plugin-jsdoc
Safe autofixRecommended
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-defaults": "error",
},
},
];This rule reports defaults being used on the relevant portion of @param or @default.
/**
* @param {number} [foo="7"]
*/
function quux (foo) {/**
* @param foo
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/no-defaults
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-defaults": "error",
},
},
];jsdoc/no-defaults
jsdoc plugin · correctness
{
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/no-defaults": "error"
}
}Biome does not have this rule.
Prevents use of multiple asterisks at the beginning of lines.
Requires that the @returns tag has a description value (not including void/undefined type returns).
Requires that all @property tags have names.
Requires that each @property tag has a description value.
Requires that all @typedef and @namespace tags have @property when their type is a plain object, Object, or PlainObject.