Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-unnecessary-components #207

Merged
merged 5 commits into from
Aug 23, 2024
Merged

Conversation

iansan5653
Copy link
Contributor

@iansan5653 iansan5653 commented Aug 21, 2024

Ports over the unnecessary-components rule from our internal codebase, renaming it to no-unnecessary-components for consistency. Also adds a skipImportCheck option to the rule.

This rule is fully shipped internally and the autofix is extensively tested. Now it would be great to get it into Primer and apply the autofix there as well. Once shipped we can delete the rule internally since this will fully replace it.

@iansan5653 iansan5653 requested a review from a team as a code owner August 21, 2024 17:21
Copy link

changeset-bot bot commented Aug 21, 2024

🦋 Changeset detected

Latest commit: fb52cea

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

'eslint-plugin-primer-react': major
---

[Breaking] Adds `no-unnecessary-components` lint rule and enables it by default. This may raise new (typically autofixable) lint errors in existing codebases.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that I've marked this as a major change because the new rule is enabled by default, which may raise new lint errors in existing code.

Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Nice 👍🏻

@iansan5653 iansan5653 merged commit baff792 into main Aug 23, 2024
8 checks passed
@iansan5653 iansan5653 deleted the add-no-unnecessary-components branch August 23, 2024 19:39
@primer-css primer-css mentioned this pull request Aug 16, 2024
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