What version of Oxlint are you using?
1.32.0
What command did you run?
pnpm oxlint --type-aware --max-warnings=0 --type-check
What does your .oxlintrc.json config file look like?
What happened?
{
const method = 'POST' as const;
await fetch(`some-url`, { method, body: '' }); // no error
}
{
const options = {
method: 'POST',
} as const;
await fetch(`some-url`, { method: options.method, body: '' }); // error happens
}
⚠ eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
╭─[index.ts:13:52]
12 │
13 │ await fetch(`some-url`, { method: options.method, body: '' });
· ────
14 │ }
╰────
{ "$schema": "./node_modules/oxlint/configuration_schema.json", // Enable TypeScript, Unicorn, and Oxc plugins "plugins": ["unicorn"], // Ignore patterns "ignorePatterns": ["dist", "node_modules"], }