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

Update a11y-use-next-tooltip to be a11y-use-accessible-tooltip and make the changes accordingly #270

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Nov 6, 2024

Since Tooltip v2 is now exported from @primer/react bundle and Tooltip v1 from @primer/react/deprecated, this PR updates the code accordingly and renames the rule.

Copy link

changeset-bot bot commented Nov 6, 2024

🦋 Changeset detected

Latest commit: c8ca93d

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

@broccolinisoup broccolinisoup marked this pull request as ready for review November 6, 2024 07:44
@broccolinisoup broccolinisoup requested a review from a team as a code owner November 6, 2024 07:44
Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

Looks good! Just one question: is there any potential side-effects to changing the rule name? (e.g., if it's being overridden in current code usage would a bunch of comments need to be updated or something like that?)

Comment on lines 65 to 67
const rootImport = sourceCode.ast.body.find(statement => {
return statement.type === 'ImportDeclaration' && statement.source.value === '@primer/react'
})
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if there's a reason we can't reuse the rootImport from line 43 here?

Copy link
Member Author

@broccolinisoup broccolinisoup Nov 7, 2024

Choose a reason for hiding this comment

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

We can re-use! I missed that due to using the wrong method (filter vs find.) I updated the code 🤗 Thanks for catching that.

@broccolinisoup
Copy link
Member Author

Looks good! Just one question: is there any potential side-effects to changing the rule name? (e.g., if it's being overridden in current code usage would a bunch of comments need to be updated or something like that?)

The rule is currently off at dotcom - we haven't started using it yet so thankfully no need to update a bunch of line etc. However I caught 2 usages in the helphub so these need to be updated. I'll mark this as major so that we can communicate this change.

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

🚀🚀

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