jsdoc/no-bad-blocks
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-bad-blocks": "error",
},
},
];This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.
/*
* @param foo
*/
function quux (foo) {/**
* @property foo
*/Examples from the ESLint documentation.
jsdoc/no-bad-blocks
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-bad-blocks": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
This rule reports doc comments that only restate their attached name.
If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description.
Reports if JSDoc import() statements point to a package which is not listed in dependencies or devDependencies
Requires that each JSDoc line starts with an *.
Checks that any @template names are actually used in the connected @typedef or type alias.
Requires that all functions (and potentially other contexts) have a description.