Open
Description
Now that less-strict parsing for @param
tags is merged (#128), I'd love to be able to loosen the requirements of the tsdoc/syntax
rule to allow for certain deviations from the expected syntax.
Primarily, VSCode's built-in JSDoc support automatically adds a doc comment where each @param
tag is followed immediately by a description, without the expected hyphen. With the following .eslintrc
configuration:
{
rules: {
'tsdoc/syntax': 'warn'
}
}
This snippet is valid:
/**
* Description
* @param a - first number
* @param b - second number
*/
const add = (a: number, b: number) => a + b;
While this snippet:
/**
* Description
* @param a first number
* @param b second number
*/
const add = (a: number, b: number) => a + b;
Warns with the following:
tsdoc-param-tag-missing-hyphen: The @param block should be followed by a parameter name and then a hyphen eslint(tsdoc/syntax)
I'd love to be able to ignore this particular syntax deviation with something like:
{
rules: {
'tsdoc/syntax': ['warn', ignore: ['tsdoc-param-tag-missing-hyphen'] ]
}
}