-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type import flagged is missing and unpublished #66
Comments
I'm open to that - just wondering what's the best solution on it. the generated |
I'd argue I'm getting this error multiple times here: Note that |
We do have an option for ignoring type imports in Does this cover your use case? |
I am running into the exact same problem, using a private package that only exports types.
|
mmm, could you possibly reproduce the issue in a small repo or in the eslint playground? |
Sure! Here it is: eslint-n-missing-import-repro Since the problematic package in my case is private, I used |
That's perfect, thank you so much! 💚 I will try to look in the latter half of this week |
I am thinking about trying to change from import-meta-resolve to enhanced-resolve 🤔 There are a few reasons for this:
This could be a little finicky to get right 😅 I will give it a go this weekend to see if its plausible! EditThe eslint-import-resolver seems to also use enhanced-resolve |
* feat: Use enhanced-resolve for imports * chore: Improve the metadata from "ImportTarget" * chore: remove "enhanced-resolve" from "no-hide-core-modules" * test: Add a test for #66 * feat!: Allow ts paths aliases (#84) * feat: Allow for "allowImportingTsExtensions" (#134) * feat: Add test for import maps (#147) * Update lib/util/import-target.js Co-authored-by: Sebastian Good <[email protected]> * test: Add test for n/no-missing-require eslint/use-at-your-own-risk * chore: Remove esbuild * feat: Allow for settings.cwd to be used before process.cwd * chore: replace reference to eslint/use-at-your-own-risk * chore: Remove more unused packages * chore: update rule test options to flat config * fix: incorrect env in tests --------- Co-authored-by: 唯然 <[email protected]>
idk if there is an existing rule to handle this case, but in Typescript, you can do:
for context, when transpiling to either CJS or MJS, the import doesn't make it to the output -- obviously a lint plugin can't know that is going to happen, but if there could be some way to relax
n/no-missing-import
andn/no-unpublished-import
, (or require thatsome-library
be indevDependencies
if not found in the normal locations, this'd be a huge help <3The text was updated successfully, but these errors were encountered: