You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The require-param rule option checkTypesPattern currently doesn't work deeply for destructured parameters.
Expected behavior
If you use object for an @param root type but then a named type (e.g. FooBar) for one of it's destructured properties, there should be no jsdoc/require-param lint errors.
Actual behavior
There are unexpected lint errors.
ESLint Config
{
"rules": {
"jsdoc/require-param": "error"
}
}
ESLint sample
This has the unexpected lint error Missing JSDoc @param "options.a.b" declaration. eslint(jsdoc/require-param):
/** * Description. * @param {object} options Options. * @param {FooBar} options.a A description. */functionfoo({a: { b }}){}
This does not:
/** * Description. * @param {Foo} options Options. * @param {FooBar} options.a A description. */functionfoo({a: { b }}){}
Environment
Node version: v14.4.0
ESLint version v7.2.0
eslint-plugin-jsdoc version: v27.0.4
The text was updated successfully, but these errors were encountered:
The
require-param
rule optioncheckTypesPattern
currently doesn't work deeply for destructured parameters.Expected behavior
If you use
object
for an@param
root type but then a named type (e.g.FooBar
) for one of it's destructured properties, there should be nojsdoc/require-param
lint errors.Actual behavior
There are unexpected lint errors.
ESLint Config
ESLint sample
This has the unexpected lint error
Missing JSDoc @param "options.a.b" declaration. eslint(jsdoc/require-param)
:This does not:
Environment
eslint-plugin-jsdoc
version: v27.0.4The text was updated successfully, but these errors were encountered: