Skip to content

linter: import/no-duplicates has error when namespaced and named imports present #6660

@pumano

Description

@pumano

What version of Oxlint are you using?

0.9.10

What command did you run?

oxlint -c oxlintrc.json --quiet

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

{
  "plugins": ["import"],
  "rules": {
    "import/no-duplicates": "error"
  }
}

What happened?

Yesterday I only fix typed import, but submit issue about namespaced + named import, maybe someone want to fix it. Test cases exist in:

// (r"import * as ns from './foo'; import { y } from './foo'", None),
// (r"import { y } from './foo'; import * as ns from './foo'", None),

error snap:

 × eslint-plugin-import(no-duplicates): Forbid repeated import of the same module in multiple places
   ╭─[features/page-projects/src/lib/project-form/project-form.component.ts:87:24]
86 │ import * as streams from './streams';
87 │ import * as utils from './utils';
   ·                        ─────────
88 │ import { errorMapFactory } from './utils';
   ·                                 ─────────
89 │ 
   ╰────

Metadata

Metadata

Assignees

Labels

A-linterArea - LinterC-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions