What version of Oxlint are you using?
1.25.0
What command did you run?
npx oxlint
What does your .oxlintrc.json config file look like?
What happened?
oxc incorrectly emits
Unexpected var, use let or const instead.
help: Replace var with let or const
oxc eslint(no-var)
for a declare global block in TypeScript code, like
declare global {
var __SPECIAL_VALUE__: boolean | undefined;
}
If we update that code to
declare global {
const __SPECIAL_VALUE__: boolean | undefined;
}
and try accessing
globalThis.__SPECIAL_VALUE__
later, we get
Property '__SPECIAL_VALUE__' does not exist on type 'typeof globalThis'.ts(2339)
{ "categories": { "restriction": "deny" } }