Skip to content
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 "no-fallthrough" to base rules #135

Merged
merged 6 commits into from Apr 30, 2024

Conversation

benjaminpearson
Copy link
Contributor

@benjaminpearson benjaminpearson commented Mar 10, 2024

Ensure switch statements contain a break, return or throw in each case. I believe most of the time engineers would intend for a case statement to not fallthrough to the next statement. Thus this eslint rule (which is part of eslint:recommended - see source) I'd say is a sensible default.

Rule: https://eslint.org/docs/latest/rules/no-fallthrough

Ensure switch statements contain a break, return or throw
@benjaminpearson benjaminpearson requested a review from a team as a code owner March 10, 2024 23:10
Copy link

changeset-bot bot commented Mar 10, 2024

🦋 Changeset detected

Latest commit: faa6b95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-config-seek Minor

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

@askoufis
Copy link
Contributor

askoufis commented Apr 15, 2024

Do we want to get this out with #140?

@askoufis askoufis enabled auto-merge (squash) April 30, 2024 00:09
@askoufis askoufis merged commit 14f99b3 into seek-oss:master Apr 30, 2024
1 check passed
@seek-oss-ci seek-oss-ci mentioned this pull request Apr 30, 2024
@72636c
Copy link
Member

72636c commented May 7, 2024

For posterity, just noting that this rule can report false positives because it doesn't have type information to prove exhaustiveness: typescript-eslint/typescript-eslint#3455

I suspect it's still a net positive and we should keep it for the general case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants