tsdoc-require-2/require-alpha
Require the @alpha tag in TSDoc blocks for exported declarations.
Rule detailsâ
By default, this rule reports exported declarations (and supported default exports) that have TSDoc but are missing @alpha. Set includeNonExported: true to also check non-exported top-level declarations.
It supports the same options as tsdoc-require-2/require:
enforceFor: choose which declaration kinds are checked.includeNonExported: whentrue, also check non-exported top-level declarations (default:false).
Optionsâ
{
"rules": {
"tsdoc-require-2/require-alpha": [
"error",
{
"enforceFor": [
"class",
"function",
"interface",
"type",
"enum",
"variable",
"object"
]
}
]
}
}
Examplesâ
â Incorrectâ
/**
* Performs a task.
*/
export function runTask(value: string): string {
return value;
}
â Correctâ
/**
* Performs a task.
*
* @alpha
*/
export function runTask(value: string): string {
return value;
}
Further readingâ
- TSDoc tag reference: https://tsdoc.org/pages/tags/alpha/
- Rule index: required-tags