Rule Request: [no-unsafe-ng-deep] Support flagging usage of ::ng-deep
in styles
#2304
Replies: 3 comments
-
Where I work, we implemented something similar as a Stylelint rule. I think that (or whatever CSS linter you prefer) is the best place for it. Adding a rule to this package would only work for inline styles and would required CSS/SCSS parsing to be implemented. |
Beta Was this translation helpful? Give feedback.
-
@reduckted interested in sharing a gist or repo? Btw, Technically eslint does support CSS linting at this point |
Beta Was this translation helpful? Give feedback.
-
Sorry, unfortunately I can't share it.
That's a good point. Perhaps when ESLint supports CSS -in-JavaScript (eslint/css#30) it would be feasible to add a rule to this package. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description and reproduction of the issue
I'd like to detect cases where
::ng-deep
is used in styles. In my case, I'd be OK allowing if inside of:host
, but that could be considered as a configuration on this rule.Disallowed:
Allowed:
Versions
Beta Was this translation helpful? Give feedback.
All reactions