Currently, we do not catch when the dash separating a parameter name from a parameter description is bordered by more than one whitespace character. We should enforce only one whitespace character on either side of the dash. So the following is good:
/**
* ...
*
* @param {number} x - input value
* @returns {number} output value
*/
and the following should be disallowed
/**
*
* @param {number} x - input value
* @returns {number} output value
*/
In principle, we could have up to three different lint rules:
- enforce number of whitespace characters before dash
- enforce number of whitespace characters after dash
- enforce a specific character (e.g.,
-) to be used to separate a parameter name from a description
We could also have another lint rule for enforcing that a dash should not separate a @returns annotation from its description. This should likely be its own RFC.
Notes
Ref: #13654
Currently, we do not catch when the dash separating a parameter name from a parameter description is bordered by more than one whitespace character. We should enforce only one whitespace character on either side of the dash. So the following is good:
and the following should be disallowed
In principle, we could have up to three different lint rules:
-) to be used to separate a parameter name from a descriptionWe could also have another lint rule for enforcing that a dash should not separate a
@returnsannotation from its description. This should likely be its own RFC.Notes
Ref: #13654