chore!: remove styled-system dependency and deprecated rules#577
Merged
Conversation
- Deleted the `no-system-props` rule to eliminate checks for styled-system props in components. - Removed the `no-unnecessary-components` rule that enforced the use of plain HTML elements over `Box` and `Text` when not using `sx` for styling. - Eliminated the `use-styled-react-import` rule that enforced importing components from `@primer/styled-react` when using the `sx` prop.
🦋 Changeset detectedLatest commit: c728118 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
jonrohan
approved these changes
Jun 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the plugin’s styled-system-related surface area by deleting three deprecated rules and dropping the styled-system / @styled-system/props dependencies, reflecting a breaking change for consumers who relied on those rules.
Changes:
- Removed
no-system-props,no-unnecessary-components, anduse-styled-react-importrule implementations plus their tests and docs. - Updated rule exports, recommended config, and README rule list to stop referencing the removed rules.
- Removed
styled-systemand@styled-system/propsfrom dependencies and lockfile, and added a major-version changeset.
Show a summary per file
| File | Description |
|---|---|
| src/rules/use-styled-react-import.js | Deleted the deprecated rule implementation. |
| src/rules/no-unnecessary-components.js | Deleted the deprecated rule implementation. |
| src/rules/no-system-props.js | Deleted the deprecated rule implementation. |
| src/rules/tests/use-styled-react-import.test.js | Removed tests for deleted rule. |
| src/rules/tests/no-unnecessary-components.test.js | Removed tests for deleted rule. |
| src/rules/tests/no-system-props.test.js | Removed tests for deleted rule. |
| src/index.js | Removed exports for deleted rules. |
| src/configs/recommended.js | Removed deleted rules from the recommended preset. |
| README.md | Removed deleted rules from the documented rules list. |
| package.json | Dropped styled-system and @styled-system/props dependencies. |
| package-lock.json | Updated lockfile to remove styled-system packages. |
| docs/rules/use-styled-react-import.md | Removed docs for deleted rule. |
| docs/rules/no-unnecessary-components.md | Removed docs for deleted rule. |
| docs/rules/no-system-props.md | Removed docs for deleted rule. |
| .changeset/drop-styled-system.md | Added changeset marking this as a major/breaking release. |
Copilot's findings
- Files reviewed: 14/15 changed files
- Comments generated: 1
francinelucca
enabled auto-merge (squash)
June 17, 2026 20:08
francinelucca
disabled auto-merge
June 17, 2026 20:08
liuliu-dev
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
no-system-propsrule to eliminate checks for styled-system props in components.no-unnecessary-componentsrule that enforced the use of plain HTML elements overBoxandTextwhen not usingsxfor styling.use-styled-react-importrule that enforced importing components from@primer/styled-reactwhen using thesxprop.styled-system,@types/styled-system/propsdependencies