-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix prefer-object-spread in /website
#7338
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 prefer-object-spread in /website
#7338
Conversation
| const rest = { ...this.props }; | ||
| delete rest.children; | ||
| delete rest.copy; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { children, copy, ...rest } = this.props;There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| no-unused-vars: | ||
| - error | ||
| - ignoreRestSiblings: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #7269 (comment)
|
You guys prefer const { children, copy, ...rest } = this.props;or const { children, copy: _, ...rest } = this.props;? In this case |
|
Looks better: const { children, copy, ...rest } = this.props; |
|
better, but second can tell |
docs/directory)changelog_unreleased/*/pr-XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨