We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
0.15.13
npx oxlint
.oxlintrc.json
{ "env": { "browser": true }, "categories": { "correctness": "error" }, "rules": { "curly": ["error", "multi-line"] } }
The following snippet passes eslint when set to curly: ['error', 'multi-line'] but fails in oxlint.
curly: ['error', 'multi-line']
I expect this single line else to be okay when set to 'multi-line'
'multi-line'
const isIterable = (obj: any) : obj is Iterable<IgnoreRule> => { if (obj === null) return false; else if (typeof obj === 'string') return false; else return typeof value[Symbol.iterator] === 'function'; };
Oxlint output:
× eslint(curly): Expected { after 'else'. ╭─[src/testFile.ts:88:10] 87 │ else if (typeof obj === 'string') return false; 88 │ else return typeof value[Symbol.iterator] === 'function'; · ──────────────────────────────────────────────────── 89 │ }; ╰──── help: Replace `return typeof value[Symbol.iterator] === 'function';` with `{return typeof value[Symbol.iterator] === 'function';}`.
The text was updated successfully, but these errors were encountered:
It's a bit strange, I tried testing with or without parentheses in the source code, but both cargo test passed.
cargo test
Sorry, something went wrong.
Here's a minimal reproduction https://github.com/MichaelGoff/oxlint-curly-multiline-issue
npx oxlint throws the error
I'm on Windows 10 using Node 22.11.0 if that's relevant.
mac arm64 + node 22.14.0, Found 0 warnings and 0 errors..
Found 0 warnings and 0 errors.
Maybe someone else will try again?
No branches or pull requests
What version of Oxlint are you using?
0.15.13
What command did you run?
npx oxlint
What does your
.oxlintrc.json
config file look like?What happened?
The following snippet passes eslint when set to
curly: ['error', 'multi-line']
but fails in oxlint.I expect this single line else to be okay when set to
'multi-line'
Oxlint output:
The text was updated successfully, but these errors were encountered: