-
-
Notifications
You must be signed in to change notification settings - Fork 902
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
infra(typescript-eslint): switch-exhaustiveness-check #2519
infra(typescript-eslint): switch-exhaustiveness-check #2519
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #2519 +/- ##
==========================================
- Coverage 99.57% 99.57% -0.01%
==========================================
Files 2787 2787
Lines 249373 249376 +3
Branches 1079 1080 +1
==========================================
+ Hits 248316 248318 +2
- Misses 1029 1030 +1
Partials 28 28
|
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.
Doesn't this change the behavior when called from JavaScript?
Yes, it does. Should we delay the default removal to v9? (Although I consider those bad arguments unsupported usage anyway) |
i support including this in v9. |
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 without the breaking changes
@matthewmayer I reverted the breaking changes for now, so we can enable this rule. |
Ref: #2508
Enables the
@typescript-eslint/switch-exhaustiveness-check
lint rule.This removes default cases that are already covered by the explicit case statements on union types.Delayed to v9.There are some non-union type switch cases that aren't exhaustive, and won't be detected by typescript-eslint.
I will create a separate issue for that on typescript-eslint's side.
Related Issues and PRs:
default
case on an already exhaustiveswitch
typescript-eslint/typescript-eslint#7539