-
-
Notifications
You must be signed in to change notification settings - Fork 886
Closed
Copy link
Labels
Description
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'
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';}`.
Reactions are currently unavailable
{ "env": { "browser": true }, "categories": { "correctness": "error" }, "rules": { "curly": ["error", "multi-line"] } }