jsdoc/check-syntax
eslint-plugin-jsdoc
Safe autofix
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-syntax": "error",
},
},
];Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
/**
* @param {string=} foo
*/
function quux (foo) {/**
* @param {string=} foo
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/check-syntax
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-syntax": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Reports invalid alignment of JSDoc block lines.
Checks that any @template names are actually used in the connected @typedef or type alias.
Reports if JSDoc import() statements point to a package which is not listed in dependencies or devDependencies
This rule reports doc comments that only restate their attached name.
This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.