Simplify getSupportInfo#7269
Merged
alexander-akait merged 3 commits intoprettier:nextfrom Jan 16, 2020
Merged
Conversation
thorn0
reviewed
Jan 11, 2020
| delete newObject.deprecated; | ||
| delete newObject.redirect; | ||
| // eslint-disable-next-line no-unused-vars | ||
| const { deprecated, redirect, ...newObject } = Object.assign({}, object); |
Member
There was a problem hiding this comment.
Member
Author
There was a problem hiding this comment.
I thought about it, but I thought this case
const {a, ...b} = cif a and b both not used, it will not report an error.
But I'm not sure now.. not near my laptop.
Member
There was a problem hiding this comment.
BTW, Object.assign is not needed here.
Member
Author
There was a problem hiding this comment.
Fixed.
Also enabled ignoreRestSiblings, works as expected
const {a, ...b} = cIf a&b not used, report b is not used.
If a used b not used, report b is not used.
If b used a not used, no error.
4 tasks
thorn0
reviewed
Jan 15, 2020
fisker
commented
Jan 15, 2020
| .filter(option => filterSince(option) && filterDeprecated(option)) | ||
| .map(mapDeprecated) | ||
| .map(mapInternal) | ||
| .sort((a, b) => (a.name === b.name ? 0 : a.name < b.name ? -1 : 1)) |
Member
Author
There was a problem hiding this comment.
I changed filter and sort order, so array for sort could be smaller.
thorn0
approved these changes
Jan 15, 2020
lipis
approved these changes
Jan 15, 2020
44 tasks
alexander-akait
approved these changes
Jan 16, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/directory)changelog_unreleased/*/pr-XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨