-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
[check-param-names] Support disabling destructuring #616
Comments
…sabling of destructured checking; fixes part of gajus#616 Also improves display of errors when destructured properties are present
I've filed #617 which should address your first desired behavior. For the second desired behavior, we'd need to add a new option--any suggested names for the option? Maybe This latter option should I think only be applied to I guess some might want /**
* @param obj.foo
* @param root
*/
function quux ({foo}, root) {
} ...but this would not be standard jsdoc, as jsdoc requires the root have its own declaration. |
Btw, if you want the style {
autoIncrementBase: 1,
unnamedRootBase: 'param'
} |
I tested #617 and it seems to resolve my problem 🙌 Thanks! And you're right, the latter option is out of function Component(props: ComponentProps) { }
function Component({ children }: ComponentProps) { } It's just… there is no sense for you to document destructured |
I think it makes sense for us to keep I think if we allow function Component(props: ComponentProps) { }
function Component({ children }: ComponentProps) { } |
…sabling of destructured checking; fixes part of #616 Also improves display of errors when destructured properties are present
🎉 This issue has been resolved in version 30.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Motivation
When using TypeScript and React it's really simple to write your components and their props like that:
Current behavior
Unfortunately, in some of recent (not that I missed about five months of releases) versions defaults now ask you:
root1
(param1
according to TypeScript) parameter (that's okay, I can do that even that it is never displayed anywhere?)root1
, so in our caseparam1.target
(that's not okay and is useless duplication for TypeScript)Desired behavior
Be able to either (or both):
root1
/param1
to be documented)root1
parameters entirely (require only named parameters to be documented and skip automatic ones)Alternatives considered
Someone seemed to reported something the same (#530) and it was marked as fixed. It was related to
require-param
and fix addedcheckDestructured
option, but this rule does not affectcheck-param-names
.The text was updated successfully, but these errors were encountered: