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

Support for removing unused dependencies in constructor dependency injection #599

Open
rafaeldolfe opened this issue Sep 5, 2022 · 0 comments

Comments

@rafaeldolfe
Copy link

constructor(
        private readonly snackBar: MatSnackBar,
        private readonly securityService: SecurityService,
        private readonly rightPanelService: RightPanelService,
        private readonly angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics,
        private readonly cacheSignalRService: CacheSignalRService,
        private readonly locationService: LocationService,
        private readonly configurationService: ConfigurationService,
        private readonly betaSettingService: BetaSettingService,
        private readonly layoutService: LayoutService,
        private router: Router,
        private readonly titleService: Title,
        private readonly translateService: TranslateService,
        private readonly appTracingHandler: AppTracingHandler,
        private readonly navigationMenuService: NavigationMenuService,
    ) {
        ...
    }

Situations with a bunch of constructor dependency injections that may be unused is not good. Expand the di related eslint rules to also look at constructor dependency injections. Or otherwise refer to another plugin that can?

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

No branches or pull requests

1 participant