tsdoc-require-2/require-remarks
Require the @remarks tag in TSDoc blocks for targeted declarations.
Rule detailsâ
This rule reports declarations that already have TSDoc but are missing @remarks.
It does not create a TSDoc block. Pair it with tsdoc-require-2/require when you also want to require comments.
Why use itâ
@remarks captures context that does not fit in a one-line summary, such as caveats, migration notes, or runtime assumptions.
Optionsâ
This rule supports the same options as tsdoc-require-2/require:
enforceForexportModeincludeNonExported(legacy alias forexportMode: "all")
Flat config example:
import tsdocRequire from "eslint-plugin-tsdoc-require-2";
export default [
{
plugins: {
"tsdoc-require-2": tsdocRequire,
},
rules: {
"tsdoc-require-2/require-remarks": "error",
},
},
];
Examplesâ
â Incorrectâ
/**
* Loads the project configuration.
*/
export function loadConfig(): string {
return "default";
}
â Correctâ
/**
* Loads the project configuration.
*
* @remarks
* Falls back to default values when no config file exists.
*/
export function loadConfig(): string {
return "default";
}
Behavior notesâ
This rule checks tag presence. It does not validate the depth or quality of the remarks text.