jsdoc/ts-ban-ts-comment
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/ts-ban-ts-comment": "error",
},
},
];Disallows (or requires descriptions for) @ts-<directive> comments, mirroring @typescript-eslint/ban-ts-comment.
// @ts-ignore
foo();// A regular comment.
/* Another regular comment. */
function foo () {}Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
jsdoc/ts-ban-ts-comment
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/ts-ban-ts-comment": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Auto-escape certain characters that are input within block and tag descriptions.
Catches unnecessary template expressions such as string expressions within a template literal.
Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.
Prefers function types over call signatures when there are no other properties.
Requires that throw statements are documented with @throws tags.