Skip to content

import-x/named resolver bug related to invalid type definitions #265

Closed as not planned
@silverwind

Description

@silverwind

Reproduction:

git clone https://github.com/silverwind/resolver-bug
cd resolver-bug
npm install
npx eslint index.js

Will raise:

1:9  error  foo not found in 'mod'  import-x/named

mod/index.js exports the variable, but mod/index.d.ts which is erronous as it refers a non-existant file does not include that export (which is likely a separate bug in vite-plugin-dts which I'm using to generate these type defs).

Deleting mod/index.d.ts makes it work, but imho it should just ignore such invalid type definitions and fall back to actual code, like it already does when no type defs are present.

This was working in a previous version, but I can't pinpoint which one exactly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions