-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
fix: Object destructuring in function parameters if key is string #599
fix: Object destructuring in function parameters if key is string #599
Conversation
Unrelated to the current PR: I've had to push with
Are you aware of that? |
To just respond on the linting issue for now... Ah yes, wasn't seeing this until
if ([
'example', 'return', 'returns', 'throws', 'exception',
'access', 'version', 'since', 'license', 'author',
'default', 'defaultvalue',
].includes(data.tag)) { |
f7cfa3f
to
b13f099
Compare
… include (for identifiers, numerics) or omit) Also return the raw value in `getFunctionParameterNames` so as to preserve original quotes when reporting.
@brettz9 Hey, sorry about the delay - the quotes I think were a quirk of default formatting with Thanks for merging in any case! 🙂 |
@michalczaplinski : Re: quotes, no worries! I apologize I only later edited in a smile to suggest I wasn't complaining at you. But I'll admit I was nervous there was some new config in our pipeline that was imposing the abomination that is double quotes. :) And no worries re: the delay either. Thanks for the helpful fix! |
Fixes: #598
A key in a destructured object that is passed as a function parameter could be a string or a number. This case was previously not handled by
getParamName()
.Example that failed before and succeeds now: