jsdoc/check-alignment
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-alignment": "error",
},
},
];/**
* @param {Number} foo
*/
function quux (foo) {
// with spaces
}/**
* Desc
*
* @param {Number} foo
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/check-alignment
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-alignment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Ensures that if a @yields is present that a yield (or yield with a value) is present in the function body (or that if a @next is present that there is a yield with a return value present).
Requires that all function parameters are documented with a @param tag.
Requires a return statement in function body if a @returns tag is specified in JSDoc comment(and reports if multiple @returns tags are present).
This rule checks the values for a handful of tags: @version, @since, @license and @author.
Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks.
Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).