stylelint complains about :global selector
See original GitHub issue// https://github.com/callstack/linaria/blob/60962090410ea3878f3c190817c1667a124d7df9/docs/BASICS.md#adding-global-styles
export const globalCSS = css`
:global() {
@import-sanitize;
}
`
Running stylelint on the above code will give:
src/App.tsx
9:3 ✖ Unexpected unknown pseudo-class selector ":global" selector-pseudo-class-no-unknown
My stylelint config is:
extends:
- stylelint-config-recommended
- linaria/stylelint-config
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Configuration | Stylelint
Rules determine what the linter looks for and complains about. There are over 170 rules built into Stylelint. No rules are turned on...
Read more >Lint your CSS with stylelint
Above all, you need to control your selectors. Ruthlessly. With stylelint, you can disallow selectors that exceed a certain specificity, ...
Read more >How to keep this CSS code DRY along with satisfying no ...
The desugared CSS has interwoven class selectors and element selectors. ... off the rules for this code block using /* stylelint-disable .
Read more >Tooling - styled-components
Add a lint:css script to your package.json which runs stylelint with a glob to all ... styled component, what you really interpolate is...
Read more >An ode to the CSS owl selector - DEV Community
The * is the universal selector in CSS, it applies to all ... why stylelint complains about having two universal selectors together.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those who still have this problem, just add this rule to your .stylelintrc:
Reference: https://stylelint.io/user-guide/configure#rules
This also happens for
:export
.