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

Add autofixer to no-get rule #577

Merged
merged 1 commit into from
Nov 11, 2019
Merged

Add autofixer to no-get rule #577

merged 1 commit into from
Nov 11, 2019

Conversation

bmish
Copy link
Member

@bmish bmish commented Nov 8, 2019

Adds an autofixer to help with the adoption of this rule. There is already a codemod for this but the autofixer is more accessible.

I recently updated the rule to eliminate some false positives (#580 #581) and thus safely enable adding this autofixer.

@bmish
Copy link
Member Author

bmish commented Nov 8, 2019

Looking for feedback on whether there's interest in this autofixer despite the unsafe situations mentioned above.

Copy link
Member

rwjblue commented Nov 9, 2019

Can you detect the simple version of the two caveats (like if ArrayProxy or ObjectProxy are imported, or if we detect an unknownProperty), and bail out on the fixer?

Adds an autofixer to help with the adoption of this rule. There is already a codemod (https://github.com/rondale-sc/es5-getter-ember-codemod) for this but the autofixer is more accessible.
@bmish
Copy link
Member Author

bmish commented Nov 9, 2019

@rwjblue good news, I updated the rule to eliminate those false positives (#580 #581) and thus safely enable adding this autofixer.

@rwjblue
Copy link
Member

rwjblue commented Nov 11, 2019

Awesome!

@bmish bmish merged commit d9e7f9a into ember-cli:master Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants