-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
no-fallthrough has some false positive effects when multiple cases present #6417
Comments
Could I take this issue? I have reproduced the different behavior between eslint and oxlint for the no-fallthrough rule. |
@Boshen @rzvxa In the
The Can I get some help to resolve this issue? |
Yeah, We have some limitations at the moment that makes accessing cases really difficult. Feel free to tinker with that demonic function to get it to work. Let me know how I can help you with this. |
@rzvxa |
@kth496 do you have a PR? I'll let someone else work on this if you don't have the time. |
@Boshen |
There seems to be something wrong with this case as well, but it works in ESLint (v9.17.0). oxlint version: // index.ts
export const getLangByCodeType = (codeType: string): string => {
switch (codeType) {
case 'Apache Maven':
case 'Apache Ivy':
default:
return 'xml'
case 'Gradle Groovy DSL':
case 'Gradle Kotlin DSL':
return 'groovy'
case 'Scala SBT':
return 'scala'
case 'Composer':
return 'json'
}
} // .oxlintrc.json
{
"rules": {
"no-fallthrough": ["error", { "allowEmptyCase": true }]
}
} |
in some edge cases (looks like problem in
||
and&&
):The text was updated successfully, but these errors were encountered: