Skip to content

Bug: import type fails with no-missing-import if node fails to resolve the import #286

@perrin4869

Description

@perrin4869

Environment

ESLint version: 8.57.0
eslint-plugin-n version: 17.7.0

What rule do you want to report?

n/no-missing-import

Link to Minimal Reproducible Example

https://eslint-online-playground.netlify.app/#eNp1kk1uwyAQha+C2KSVYpxFV+mmi96gy5BKrhlbTvFAAUepIt+9A/6JkzQbjJmP94YHZ+5dmcOpaK0GETzf8qa1xgUWfi2wD3BHcBq8Z5UzLZPczyuSS5RYGvSGtmpTP13oZ77m4HWDQRBQNbU4LKQPs9rbAOUHUnuVOFmP9VXswZeusSEbwNUFQqNgxIZaZnVXN5hhhCTCKWEKqqLTge0kMjIe2/HCQWnaFlCBWseSEHT6h9VoNhV3kle6CPmCyYYmJd8n+hwHxlxHUWynP8Z+OhPiAgmAc8ZJvqYIlOm+NExbGevTN457OgflaIvyu6iBEjRIGSY5yWM0km9p1hpFRiQ2FBQc38HGtrBsgHKdOyDbFNSwjY4Anuaj7fVd/AvcxPyAWj6QCHy+iI3YLH3Srea33J3Q3eVfcykliT3v/wAjz/CN

What did you expect to happen?

An import that only imports a type should be excluded from n/no-missing-import. In the example above, serverless@4 stopped providing their main file, and this causes the linting to fail

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions