-
Notifications
You must be signed in to change notification settings - Fork 235
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
add new rule to enforce the use of providedIn flag #558
Comments
Related to #135. Btw, any news on integrate material2#validateDecoratorsRule here? |
Following the feature request process that lodash has, I'm closing the issue and adding Later we can prioritize the feature requests by popularity and include them in a future release. |
You can assign it to me |
GitHub does not allow this but since you're taking it I'll drop |
@mgechev @wKoza
... and this list is growing... What's your opinion about implement something like A default config would be: {
"rules": {
"validate-decorators": [
true, {
"Component": {
"changeDetection": "\\.OnPush$",
"!encapsulation": "\\.None$",
"!host": ".*",
"!inputs": ".*",
"!outputs": ".*",
"!queries": ".*",
"selector": ".*"
},
"Directive": {
"selector": ".*"
},
"Pipe": {
"!pure": ".*"
}
}
]
}
} ... and of course we could allow users to customize it according to their project standards, and why not also their decorators. |
Sounds good. I can talk to @jelbourn to converge both rules. |
Does this rule allow for a non-singleton services? I haven't seen an example where provideIn is used for a component, only root/Modules. |
This is recognized as best practice for providers with Angular 6 (we can now perform tree shaking and remove services that aren't used by your app
The text was updated successfully, but these errors were encountered: