Skip to content

Disable nesting-selector-no-missing-scoping-root for CSS-in-JS files#657

Merged
jonrohan merged 3 commits intodependabot/npm_and_yarn/production-dependencies-e0059f00e3from
copilot/sub-pr-654
Jan 29, 2026
Merged

Disable nesting-selector-no-missing-scoping-root for CSS-in-JS files#657
jonrohan merged 3 commits intodependabot/npm_and_yarn/production-dependencies-e0059f00e3from
copilot/sub-pr-654

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 29, 2026

The dependency update to stylelint v16.26.1 introduced nesting-selector-no-missing-scoping-root via stylelint-config-recommended, which rejects the & selector in styled-components as missing a scoping root.

Changes

  • Disabled nesting-selector-no-missing-scoping-root for .tsx files in the overrides configuration
  • The rule doesn't understand CSS-in-JS patterns where & refers to the component itself
// In styled-components, this is valid:
const StyledButton = styled.button`
  &:focus {
    box-shadow: 0 0 0 2px ${themeGet('colors.accent.fg')};
  }
`

// But the new rule expects an explicit scoping root like:
// .button { &:focus { ... } }

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: 13e6984

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 2 commits January 29, 2026 21:28
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>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Copilot AI changed the title [WIP] Bump production-dependencies group with 5 updates Disable nesting-selector-no-missing-scoping-root for CSS-in-JS files Jan 29, 2026
Copilot AI requested a review from jonrohan January 29, 2026 21:31
@jonrohan jonrohan marked this pull request as ready for review January 29, 2026 21:35
@jonrohan jonrohan requested a review from a team as a code owner January 29, 2026 21:35
@jonrohan jonrohan merged commit a5cfa9b into dependabot/npm_and_yarn/production-dependencies-e0059f00e3 Jan 29, 2026
6 checks passed
@jonrohan jonrohan deleted the copilot/sub-pr-654 branch January 29, 2026 21:35
jonrohan added a commit that referenced this pull request Jan 29, 2026
…tes (#654)

* Bump the production-dependencies group across 1 directory with 5 updates

Bumps the production-dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [stylelint](https://github.com/stylelint/stylelint) | `16.21.0` | `16.26.1` |
| [stylelint-browser-compat](https://github.com/3846masa/stylelint-browser-compat) | `1.0.0-beta.169` | `1.0.0-beta.180` |
| [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) | `38.0.0` | `39.0.1` |
| [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) | `6.12.1` | `6.13.0` |
| [stylelint-value-no-unknown-custom-properties](https://github.com/csstools/stylelint-value-no-unknown-custom-properties) | `6.0.1` | `6.1.0` |



Updates `stylelint` from 16.21.0 to 16.26.1
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint@16.21.0...16.26.1)

Updates `stylelint-browser-compat` from 1.0.0-beta.169 to 1.0.0-beta.180
- [Release notes](https://github.com/3846masa/stylelint-browser-compat/releases)
- [Changelog](https://github.com/3846masa/stylelint-browser-compat/blob/develop/CHANGELOG.md)
- [Commits](3846masa/stylelint-browser-compat@v1.0.0-beta.169...v1.0.0-beta.180)

Updates `stylelint-config-standard` from 38.0.0 to 39.0.1
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](stylelint/stylelint-config-standard@38.0.0...39.0.1)

Updates `stylelint-scss` from 6.12.1 to 6.13.0
- [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md)
- [Commits](stylelint-scss/stylelint-scss@v6.12.1...v6.13.0)

Updates `stylelint-value-no-unknown-custom-properties` from 6.0.1 to 6.1.0
- [Release notes](https://github.com/csstools/stylelint-value-no-unknown-custom-properties/releases)
- [Changelog](https://github.com/csstools/stylelint-value-no-unknown-custom-properties/blob/main/CHANGELOG.md)
- [Commits](csstools/stylelint-value-no-unknown-custom-properties@v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-version: 16.26.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: stylelint-browser-compat
  dependency-version: 1.0.0-beta.180
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: production-dependencies
- dependency-name: stylelint-config-standard
  dependency-version: 39.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: production-dependencies
- dependency-name: stylelint-scss
  dependency-version: 6.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
- dependency-name: stylelint-value-no-unknown-custom-properties
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: production-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* 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>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants