Skip to content

linter: the rule import/namespace doesn't handle external dependencies correctly #7696

@shulaoda

Description

@shulaoda

What version of Oxlint are you using?

0.14.1

What command did you run?

No response

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

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["import"],
  "rules": {
    "import/namespace": [
      "error",
      {
        "allowComputed": true
      }
    ]
  }
}

What happened?

Before this, we need to install the dependency acorn.

import * as acorn from 'acorn'; acorn.parse()
  ⚠ eslint-plugin-import(namespace): "parse" not found in imported namespace "acorn".
   ╭─[index.js:1:39]
 1 │ import * as acorn from 'acorn'; acorn.parse()
   ·                                       ─────
   ╰────

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