You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's an interesting idea, although I don't know yet how to recognize if a view/route/controller is not used.
We could search for links and transitions to some route and based on that analyze if it has a chance to be used :) But there might be routes that are not used inside the project but users are directed to them via email for example. I can imagine a landing page that says that you were unsubscribed from something which is handled in a different way in the app itself.
Route can be tricky to track, indeed.
Another thing to take into account is that this addon act like a linter, so it doesn't force you to do something. It's just a warning and you should be able to silence that warning.
However we can notify routes that aren't present in the router.js at least.
Services should be straight too as if there is no injection nor import, it should be consider as dead code.
Controller without attached routes should be considered dead too.
Right now the addon only handle components but we can imagine other algorithm to find unused routes, views, partials...
The addon can be renamed
ember-unused
and can provides multiple commands likeember unused:views
.Is it something you have in mind for futur releases?
The text was updated successfully, but these errors were encountered: