Skip to content
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: remove type arguments in prefer-object-spread (fixes #13058) #13063

Merged
merged 1 commit into from Mar 23, 2020

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

  • I have read the contributing guidelines.
  • The team has reached consensus on the changes proposed in this pull request. If not, I understand that the evaluation process will begin with this pull request and won't be merged until the team has reached consensus.

What is the purpose of this pull request? (put an "X" next to an item)

[X] Bug fix

fixes #13058

What changes did you make? (Give an overview)

Changed prefer-object-spread fixer to remove everything before the opening paren of the argument list, instead of just callee. This should remove TypeScript's type arguments as well.

Is there anything you'd like reviewers to focus on?

This looks like a correct change even without TS, because it removes whitespace between Object.assign and the opening paren of arguments, which is what similar rules usually do (via fixer.replaceText on the whole CallExpression).

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly rule Relates to ESLint's core rules evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion autofix This change is related to ESLint's autofixing capabilities 3rd party plugin This is an issue related to a 3rd party plugin, config, or parser labels Mar 19, 2020
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kaicataldo kaicataldo merged commit 4955c50 into master Mar 23, 2020
@kaicataldo kaicataldo deleted the issue13058 branch March 23, 2020 23:08
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Sep 21, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Sep 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3rd party plugin This is an issue related to a 3rd party plugin, config, or parser archived due to age This issue has been archived; please open a new issue for any further discussion autofix This change is related to ESLint's autofixing capabilities bug ESLint is working incorrectly evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript: eslint --fix command crash the code due to the prefer-object-spread rule
3 participants