jsdoc/imports-as-dependencies
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/imports-as-dependencies": "error",
},
},
];Reports if JSDoc import() statements point to a package which is not listed in dependencies or devDependencies
/**
* @type {null|import('sth').SomeApi}
*//**
* @type {null|import('eslint').ESLint}
*/Examples from the ESLint documentation.
jsdoc/imports-as-dependencies
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/imports-as-dependencies": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Checks that any @template names are actually used in the connected @typedef or type alias.
This rule reports doc comments that only restate their attached name.
Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.
Reports invalid alignment of JSDoc block lines.
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.