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-deprecated-props rule #156

Merged
merged 9 commits into from
Apr 22, 2024
Merged

Add no-deprecated-props rule #156

merged 9 commits into from
Apr 22, 2024

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Mar 15, 2024

Based on our team discussion about deprecating props that are related to accessibility changes, seems like introducing a complementary eslint rule to enforce the new API (not using the deprecated prop) is a practise worth trying.

This rule has a generic name but it only handles ActionList.Group title prop (for now). I am not sure if I should make this as generic as its name suggests i.e. adding a deprecated props and suggested fix lists so that we can enhance later or should I rename this to be only specific to ActionList.Group title prop. I am not sure which way would be better. I would love your opinions.

TODO: Ad docs and related config after getting initial feedback.

Old API

<ActionList>
  <ActionList.Group title="Group title">...</ActionList.Group>
</ActionList>

New API

<ActionList>
  <ActionList.Group>
    <ActionList.GroupHeading>Group title<ActionList.GroupHeading>
  </ActionList.Group>
</ActionList>

Copy link

changeset-bot bot commented Mar 15, 2024

🦋 Changeset detected

Latest commit: e7d2216

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 Minor

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

@broccolinisoup broccolinisoup marked this pull request as ready for review March 18, 2024 05:50
@broccolinisoup broccolinisoup requested a review from a team as a code owner March 18, 2024 05:50
Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

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

I think it's totally fine to make this one rule and keep adding to it. We can always break it up later if we need to.

@broccolinisoup broccolinisoup merged commit 15cfbb4 into main Apr 22, 2024
5 checks passed
@broccolinisoup broccolinisoup deleted the no-deprecated-props branch April 22, 2024 01:43
@primer-css primer-css mentioned this pull request Apr 22, 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.

3 participants