Skip to content

oxlint: removed unused imports #18301

@Boshen

Description

@Boshen

Just to clarify and bump what’s already been mentioned earlier in this thread: there’s a recurring need to detect unused imports independently from unused variables. Grouping both under no-unused-vars makes it impossible to flag or clean up unused imports without also affecting vars, even though unused vars are often intentional (unused args, overrides, placeholders), while unused imports are typically something users want surfaced and optionally removed via an unsafe / suggested fix (IIRC, safe fixes are impossible). I recently migrated from Biome, and this is my biggest (and maybe only!) pain point.

ESLint addresses this with eslint-plugin-unused-imports; is there any update or direction on whether Oxlint plans to support a similar split, either via a dedicated rule or broader plugin compatibility? @Boshen

Originally posted by @andreastande in #1117

Because of this reason alone we're keeping Biome in our codebase (since it's able to auto-clean unused imports, even those that start with _, without touching _-prefixed unused variables).

Metadata

Metadata

Assignees

Labels

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions