Skip to content

Conversation

@fisker
Copy link
Member

@fisker fisker commented Jan 15, 2020

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

const rest = { ...this.props };
delete rest.children;
delete rest.copy;

Copy link
Member

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;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +28 to +30
no-unused-vars:
- error
- ignoreRestSiblings: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fisker
Copy link
Member Author

fisker commented Jan 15, 2020

You guys prefer

const { children, copy, ...rest } = this.props;

or

const { children, copy: _, ...rest } = this.props;

?

In this case copy is not using

@sosukesuzuki @thorn0 @evilebottnawi

@alexander-akait
Copy link
Member

alexander-akait commented Jan 15, 2020

Looks better:

const { children, copy, ...rest } = this.props;

@fisker
Copy link
Member Author

fisker commented Jan 15, 2020

better, but second can tell copy is not using

@thorn0 thorn0 merged commit f805388 into prettier:next Jan 15, 2020
@fisker fisker deleted the style/prefer-object-spread-website branch January 15, 2020 16:29
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Apr 15, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants