Skip to content

linter: import/extensions doesn't enforce no .js extensions #21261

Description

@krzkaczor

What version of Oxlint are you using?

1.59.0

What command did you run?

oxlint .

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

// Replace this with your actual config file contents.
// It can be helpful to keep it minimal, if possible, but please ensure that it actually reproduces the issue you're reporting.
{
  "options": {
    "typeAware": true
  },
  "plugins": ["import"],
  "rules": {
    "import/extensions": [
      "error",
      "never",
      {
        "checkTypeImports": true,
        "js": "never"
      }
    ]
  }
}

What happened?

I expect lines with explicit .js extensions to be flagged:

import {Test} from "./Test.js"

but they are not.

FULL REPRO

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions