-
-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Description
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.
*/
function foo({ a: { b } }) {}This does not:
/**
* Description.
* @param {Foo} options Options.
* @param {FooBar} options.a A description.
*/
function foo({ a: { b } }) {}Environment
- Node version: v14.4.0
- ESLint version v7.2.0
eslint-plugin-jsdocversion: v27.0.4