-
-
Notifications
You must be signed in to change notification settings - Fork 919
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(unicorn): no-useless-switch-case #2508
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2508 +/- ##
==========================================
- Coverage 99.55% 99.55% -0.01%
==========================================
Files 2817 2817
Lines 251208 251188 -20
Branches 725 718 -7
==========================================
- Hits 250101 250075 -26
- Misses 1078 1113 +35
+ Partials 29 0 -29
|
Team Decision
EDIT: |
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.
Support merging in v9 so we can document the breaking change for non-TS users.
Per #2521 suggest adding the following to docs/guide/upgrading_v9/2508.md: Some methods now return undefined in Javascript when unknown enumeration values are passedSome methods would previously fallback to a default value for an option when an unknown value was passed for a enum parameter. Now, these methods will return undefined instead. This only affects usage in Javascript, as in Typescript this usage would already throw a compile-time error. For example: faker.color.rgb({format: "unexpectedvalue"})
// in Faker v8, is [ 110, 82, 190 ] like {format: "decimal"}
// in Faker v9, is undefined This affects:
|
Added. Thanks for the suggestion. |
Ready for review. |
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.
theoretically approved, but please let someone like e.g. @xDivisionByZerox evaluate my suggestion 🙂
Switched to strategy pattern. Ready to review. |
Ref: #2439
Permanently disables the
unicorn/no-useless-switch-case
lint rule.