New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require-param reports false negative since v17.0.1 #443
Comments
I have added the following code to our testing framework and found no issues reported: {
code: `
class Quux {
/**
* @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()}\`);
}
}
`,
parser: require.resolve('@typescript-eslint/parser'),
}, |
Weird, I do get issues. Maybe it's triggered because of another part of the documentation block? I've stripped the file from a lot of content (and replaced all words I cannot share in public with my own name) and created a gist: https://gist.github.com/StephanBijzitter/6cee238bf73042ca37666ed2b5384df1 Running ESLint against this file now gives me the following errors: v18.4.1, v17.0.1 (1 jsdoc error)
v17.0.0 (0 jsdoc error)
|
Ah yes, 17.0.1 added an update from Am in the middle of something now, but you might test on runkit to see how |
Cool, I haven't used comment-parser before (or runkit, that's quite awesome)! I see |
We should look into why
to add a space after the asterisk, i.e., to this:
Then |
The |
🎉 This issue has been resolved in version 18.4.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This should now be fully fixed without need for the workaround. Thanks for the report and info! |
@brettz9 Tested 18.4.2 with the workaround*, works.
Thanks for this really quick fix! |
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:But now, it complains:
Missing JSDoc @param "defaultOptions" declaration
.The automatic fixer wasn't of much help 😅 :
The text was updated successfully, but these errors were encountered: