Skip to content

linter: eslint-plugin-import(namespace) gives false warning for TypeScript enum #10318

@timostamm

Description

@timostamm

What version of Oxlint are you using?

0.16.5

What command did you run?

oxlint

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

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

What happened?

The rule is triggered:

  × eslint-plugin-import(namespace): "Foo" not found in imported namespace "./lib".
   ╭─[test.ts:3:24]
 2 │ 
 3 │ export const bar = lib.Foo.BAR;

However, Foo is defined in lib.ts:

export enum Foo {
  BAR = 0
}

Here's a full repro: https://github.com/timostamm/oxlint-import-namespace-enum

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions