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

Bug 1428051 - Remove unused Angular DI parameters #3101

Merged
merged 1 commit into from
Jan 7, 2018

Conversation

edmorley
Copy link
Contributor

@edmorley edmorley commented Jan 4, 2018

Found by adjusting the eslint no-unused-vars rule, changing the args preference from after-used to all:
https://eslint.org/docs/rules/no-unused-vars.html#options

That rule is too noisy to enable by default. Ideally we could use the AngularJS eslint plugin/config (which has specific rules for this), but it's not compatible with latest eslint:
EmmanuelDemey/eslint-plugin-angular#490

Unless these DI parameters can have side-effects I'm not aware of, this change should be reasonably safe, since eslint's no-undef rule will error if anything was removed that was being directly referenced.

Found by adjusting the eslint `no-unused-vars` rule, changing the
`args` preference from `after-used` to `all`:
https://eslint.org/docs/rules/no-unused-vars.html#options

That rule is too noisy to enable by default. Ideally we could use the
AngularJS eslint plugin/config (which has specific rules for this),
but it's not compatible with latest eslint:
EmmanuelDemey/eslint-plugin-angular#490

Unless these DI parameters can have side-effects I'm not aware of,
this change should be reasonably safe, since eslint's `no-undef` rule
will error if anything was removed that was being directly referenced.
@edmorley edmorley self-assigned this Jan 4, 2018
@edmorley edmorley merged commit b1f897a into master Jan 7, 2018
@edmorley edmorley deleted the rm-unused-di-params branch January 7, 2018 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant