-
-
Notifications
You must be signed in to change notification settings - Fork 576
feat(lint): implement useExhaustiveSwitchCases
- typescript-eslint/switch-exhaustiveness-check
#5762
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
base: main
Are you sure you want to change the base?
Conversation
I'm thrilled!!!! 🤩 |
CodSpeed Performance ReportMerging #5762 will not alter performanceComparing Summary
|
b22c4e1
to
7a486b1
Compare
…/switch-exhaustiveness-check`
7a486b1
to
d16049a
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.
Looks good. We need to add the second pillar to the diagnostic messages
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/use_exhaustive_switch_cases.rs
Outdated
Show resolved
Hide resolved
# Conflicts: # crates/biome_js_analyze/tests/spec_tests.rs
I am going to merge this after #5777, which will change some part that this rule relies on. |
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.
Love it, and well done with the solid test cases!
Thanks for waiting for the refactor too 🙏
Summary
Initial implementation of a new rule
useExhaustiveSwitchCases
, which is an equivalent totypescript-eslint/switch-exhaustiveness-check
. I left adding options for future improvement.Test Plan
Added snapshot tests.