jsdoc/require-property
eslint-plugin-jsdoc
Safe autofixRecommended
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-property": "error",
},
},
];Requires that all @typedef and @namespace tags have @property when their type is a plain object, Object, or PlainObject.
/**
* @typedef {object} SomeTypedef
*//**
*
*/Examples from the ESLint documentation.
jsdoc/require-property
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-property": "error",
},
},
];jsdoc/require-property
jsdoc plugin · correctness
{
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/require-property": "error"
}
}Biome does not have this rule.
Requires that all @param tags have names.
Requires that each @property tag has a description value.
Prohibits use of @implements on non-constructor functions (to enforce the tag only being used on classes/constructors).
Requires that all @property tags have names.
Checks tags that are expected to be empty (e.g., @abstract or @async), reporting if they have content
Requires that the @returns tag has a description value (not including void/undefined type returns).