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

Handle other ember objects #7

Open
ctjhoa opened this issue Nov 28, 2018 · 2 comments
Open

Handle other ember objects #7

ctjhoa opened this issue Nov 28, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@ctjhoa
Copy link
Contributor

ctjhoa commented Nov 28, 2018

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 like ember unused:views.

Is it something you have in mind for futur releases?

@tniezurawski
Copy link
Contributor

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.

Any idea @ctjhoa?

@ctjhoa
Copy link
Contributor Author

ctjhoa commented May 28, 2019

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.

@tniezurawski tniezurawski added the enhancement New feature or request label Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants