Hi,
I am using the no-unused-css rule of codelyzer in my typescript project.I extend codelyzer in tslint.json and use the various rules in codelyzer.
I am referring to a CSS in the style URL of typescript component. The CSS file has classes with pseudo elements like :hover, :after etc. When I run lint in my project I get errors saying that there are unused styles in CSS which points to the class with pseudo elements.
I also tried various tslint rule flags for disabling the rule like * tslint:disable:no-unused-css*\ in CSS file.
But these rules flags does not seem to work in CSS files.
Any idea how to get rid of this issue?
This rule is highly experimental and has a lot of flaws at the moment.
Can you add tslint:disable:no-unused-css in the corresponding typescript file ?
Lets close the issue for now. There are plenty of corner cases which are not handled in this rule. Probably, it's worth introducing a separate tool for this, which performs analysis over the entire project.
Could a note that this rule is experimental and buggy be added to the rule's documentation? Happy to submit a PR.
There's a note already https://github.com/mgechev/codelyzer#rules-status.
the issue is not resolved yet?
And disabling the rule also not work in css
/* tslint:disable:no-unused-css */
Most helpful comment
This rule is highly experimental and has a lot of flaws at the moment.
Can you add tslint:disable:no-unused-css in the corresponding typescript file ?