Skip to content

chore!: remove styled-system dependency and deprecated rules#577

Merged
francinelucca merged 3 commits into
mainfrom
chore/drop-styled-system-dependency
Jun 19, 2026
Merged

chore!: remove styled-system dependency and deprecated rules#577
francinelucca merged 3 commits into
mainfrom
chore/drop-styled-system-dependency

Conversation

@francinelucca

@francinelucca francinelucca commented Jun 17, 2026

Copy link
Copy Markdown
Member
  • BREAKING CHANGE: Deleted the no-system-props rule to eliminate checks for styled-system props in components.
  • BREAKING CHANGE: Removed the no-unnecessary-components rule that enforced the use of plain HTML elements over Box and Text when not using sx for styling.
  • BREAKING CHANGE: Eliminated the use-styled-react-import rule that enforced importing components from @primer/styled-react when using the sx prop.
  • Removed styled-system, @types/styled-system/props dependencies

- 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.
Copilot AI review requested due to automatic review settings June 17, 2026 17:03
@francinelucca
francinelucca requested a review from a team as a code owner June 17, 2026 17:03
@francinelucca
francinelucca requested a review from liuliu-dev June 17, 2026 17:03
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c728118

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-primer-react Major

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

@francinelucca francinelucca changed the title chore: remove styled-system dependency and deprecated rules chore!: remove styled-system dependency and deprecated rules Jun 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and use-styled-react-import rule implementations plus their tests and docs.
  • Updated rule exports, recommended config, and README rule list to stop referencing the removed rules.
  • Removed styled-system and @styled-system/props from 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

Comment thread src/index.js
@francinelucca
francinelucca enabled auto-merge (squash) June 17, 2026 20:08
@francinelucca
francinelucca disabled auto-merge June 17, 2026 20:08
@francinelucca
francinelucca merged commit f0c6656 into main Jun 19, 2026
11 checks passed
@francinelucca
francinelucca deleted the chore/drop-styled-system-dependency branch June 19, 2026 18:07
@primer primer Bot mentioned this pull request Jun 19, 2026
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.

4 participants