You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
yeah this does seem like a really tricky one, I think ideally this would be handled by this plugin, even if it's just a warning, but I can live with ignoring the rule or adding it to allowModules
On one hand I would rather correctly fix resolving the import type ... or import { type something} ... to the type definitions.
But on the other hand, that is not a "node" problem, and just ignoring type imports seems to make a world of sense, as we can the the typescript linter handle them.
I am currently leaning towards adding ignoreTypeImport to no-missing-import and making it default.
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 fromn/no-missing-import
. In the example above,serverless@4
stopped providing theirmain
file, and this causes the linting to failParticipation
Additional comments
No response
The text was updated successfully, but these errors were encountered: