-
Notifications
You must be signed in to change notification settings - Fork 52
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 event listener lints #110
Conversation
lib/configs/browser.js
Outdated
'github/unescaped-html-literal': 'error', | ||
'github/no-useless-passive': 'error', | ||
'github/no-non-passive-high-frequency-events': 'error', | ||
'github/prefer-observers-over-events': 'error' |
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.
Do we consider this to be a breaking change? Do we want to release this as semver major?
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.
To answer my own question, precedent exists for this to be semver minor, see #80 which was released as 3.3.0
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
00eb1f3
to
1d3c50c
Compare
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.
My review might not be worth as much since we worked on this with you but this looks great to me ✨
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.
⚡️
What?
This adds 3 new rules to our
config/browser
eslint config:github/no-useless-passive
github/require-passive-events
github/prefer-observers
To read more about these rules, see the documentation md files in
docs/
Why?
These represent our ideal best practices of how to author code for the GitHub frontend, and as such we'd like to enforce these rules with static analysis.