- 
        Couldn't load subscription status. 
- Fork 10
Add an eslint rule for checking interactivity of tooltip trigger #51
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
Conversation
| 🦋 Changeset detectedLatest commit: 33b5969 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.
So cool! 🥳 Loving this plugin. Left a couple of comments and questions, let me know what you think 👀
Co-authored-by: Josh Black <joshblack@github.com>
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.
So good! 🔥
| @joshblack I realised that I forgot to add some Primer components 🙈  Like  | 
| @broccolinisoup Can you update the following files to include this new rule: | 
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 great, @broccolinisoup! Just left one naming suggestion.
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 great, @broccolinisoup! Just left one naming suggestion.
Adding an eslint rule to check if the
Tooltipcomponent includes an interactive trigger.Rule Details
This rule enforces to use interactive elements as tooltip triggers. Interactive elements can be Primer
Button,IconButtonandLinkcomponents or native elements likebutton,awith anhrefattribute,select,textarea,summaryandinput(that is not ahiddentype).👎 Examples of incorrect code for this rule:
👍 Examples of correct code for this rule:
Options
skipImportCheck(default:false)By default, the
a11y-tooltip-non-interactive-triggerrule will only check for interactive elements in components that are imported from@primer/react. You can disable this behavior by settingskipImportChecktotrue. This is used for internal linting in the primer/react repository.