-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: main
Are you sure you want to change the base?
Conversation
… bundle and the old one from deprecated
🦋 Changeset detectedLatest commit: c8ca93d 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 |
There was a problem hiding this 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?)
const rootImport = sourceCode.ast.body.find(statement => { | ||
return statement.type === 'ImportDeclaration' && statement.source.value === '@primer/react' | ||
}) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀🚀
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.