In my Angular application, I have few components which are used while testing and not included in any module.
In WebStorm, it shows me a lint error saying Component is not included in any module
, while I know that this is not included and that is the purpose.
Is there a way to disable only this lint error while keeping all others enabled?
Angular: Component 'ComponentName' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration.
I saw this threat, where it was suggested to disable all Angular lint errors. However, i think it is not a good idea to do that just for one issue. I am looking for a way to only disable this one error.
Worked for me:
File -> Invalidate Caches / Restart -> Invalidate and restart
I use PHPStorm and found this problem also when using Angular 4. I fixed it by npm install @angular/language-service
.
Angular language service doesn't provide a possibility to suppress particular rules/checks. Please follow https://github.com/angular/angular/issues/13726 for updates
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With