-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
New rule: no-deprecated-transition-methods
#1074
Comments
name suggestion: |
Ya, I'm not super sold on my original name suggestion here. The thing that I want to make clear though, is that this is about deprecation avoidance (not a general preference / stylistic thing). @bmish probably has a better handle on existing naming scheme for us to follow here |
Agreed with @rwjblue that the name should state of the goal of deprecation avoidance. So |
We're hitting the same deprecation. While it seems like the deprecation is pushed back a while, this is an easy lint/codemod candidate. I implemented a similar rule with class state, adding service injection, etc in #1714 so I think I can knock this one out pretty easily. |
Adds a nice way to handle emberjs/rfcs#674 by flagging them as an issue, and adding a fixer to use the router service.
This would flag:
this.transitionTo
from a routethis.replaceWith
from a routethis.transitionToRoute
from a controllerthis.replaceRoute
from a controllerThe fixer would be:
this.transitionTo
-> adding router service +this.router.transitionTo
this.replaceWith
-> adding router service +this.router.replaceWith
this.transitionToRoute
-> adding router service +this.router.transitionTo
this.replaceRoute
-> adding router service +this.router.replaceWith
The deprecation was implemented in emberjs/ember.js#19255 and will be included in Ember 3.26.
(note: I'm not super in love with the name)
The text was updated successfully, but these errors were encountered: