Skip to content

Commit a5cfa9b

Browse files
Copilotjonrohan
andauthored
Disable nesting-selector-no-missing-scoping-root for CSS-in-JS files (#657)
* Initial plan * Disable nesting-selector-no-missing-scoping-root for .tsx files The new stylelint version (16.26.1) via stylelint-config-recommended introduces the nesting-selector-no-missing-scoping-root rule. This rule doesn't understand CSS-in-JS patterns used by styled-components where & is valid and refers to the component itself. Disabling this rule for .tsx files fixes the CI test failures. Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com> * Add comment explaining nesting-selector-no-missing-scoping-root disable Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
1 parent 8f75958 commit a5cfa9b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ export default {
149149
'length-zero-no-unit': null,
150150
'selector-max-type': null,
151151
'primer/colors': null,
152+
// Disable nesting-selector-no-missing-scoping-root for CSS-in-JS
153+
// In styled-components, the & selector is valid and refers to the component itself
154+
'nesting-selector-no-missing-scoping-root': null,
152155
},
153156
},
154157
{

0 commit comments

Comments
 (0)