Skip to content

linter: eslint/no-inner-declarations does not report for var in for loop initializer #11634

Closed
@overlookmotel

Description

@overlookmotel

What version of Oxlint are you using?

Latest main

What command did you run?

No response

What does your .oxlintrc.json config file look like?

No response

What happened?

The following cases are not considered an error under eslint/no-inner-declarations rule:

for (var x in {}) {}
for (var x of []) {}
for (var x; x < 10; x++) {}

ESLint considers all these to be errors (ESLint playground). Is there a reason why we don't?

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions