Skip to content

require-param reports false negative since v17.0.1 #443

@StephanBijzitter

Description

@StephanBijzitter

Decided to update from v15 to v18 and one of the rules started acting up, so I tried a few different versions and found that v17.0.1 is the culprit.

The following piece of code used to pass the require-param check:

     * @param args Arguments compiled and provided by <redacted>.
     * @param args.options The options as provided by the user, or an empty object if not provided.
     * @param defaultOptions The default options as provided by the plugin, or an empty object.
     */
    public constructor({options, client}: {
        options: O;
        client: Redacted;
    }, defaultOptions: D) {
        this.client = client;
        this.options = merge(defaultOptions, options) as O & D;
        this.logger = signale.scope(`plugin:${this.constructor.name.replace(/redacted/gui, '').toLowerCase()}`);
    }

But now, it complains: Missing JSDoc @param "defaultOptions" declaration.
The automatic fixer wasn't of much help 😅 :

     * @param args Arguments compiled and provided by DullahanClient.
     * @param args.options The options as provided by the user, or an empty object if not provided.
     * @param defaultOptions The default options as provided by the plugin, or an empty object.
     * @param defaultOptions
     * @param defaultOptions
     * @param defaultOptions
     * @param defaultOptions
     * @param defaultOptions
     * @param defaultOptions

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions