-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Bug: no-extraneous-import doesn't support import maps #147
Comments
Thank you for this report! I think #139 also fixes this (completely by accident) 👀 I have added a test and it seems to be covered! |
Oh nice, thank you! Out of curiosity: if pulling in In what cases would someone prefer to use the import resolvers in this plugin over |
mmm, that is a sound point! I wonder if we should support the import resolver API. 🤔 |
so can the plugins use the shared settings? sounds interesting! 👍 |
* 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 <2230835+scagood@users.noreply.github.com> * 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: 唯然 <weiran.zsd@outlook.com>
Environment
Node version: 21
npm version:
ESLint version:
eslint-plugin-n version: v16.4.0
Operating System: macOS
What rule do you want to report?
no-extraneous-import
Link to Minimal Reproducible Example
https://eslint-online-playground.netlify.app/#eNp1kDFvwyAQhf+KRVfH3j1371J1KRkwnCJaw9EDqlaR/3sOiCPZUjbu3uPTu3cVkfQ4D19RTEL0dVJtsi4gpU6Kl1kWaYC4WJ9Is4yeDVfpO5bhL4E3UYqp++SpmiYCjc7xHowUPbvCki/WT37cKee+MYKiCPQWkkVfSZVd6dqpD6DIQtlLsagEMTF0c0TMpOH9P0AzODR54XfR1zufeLPn/mRkzhaaCKnlNJjn8vtcv0u/8uVB6W91gcPdrZ89tVRVMgzjVuQ+h4HfVwjleK/tIVFr7smRTTy1Fk+HKh5R1xvHDJTm
What did you expect to happen?
For it to resolve the package.json import map
Participation
Additional comments
It only seems to check the dependency objects:
eslint-plugin-n/lib/util/check-extraneous.js
Lines 29 to 33 in 964cf65
The text was updated successfully, but these errors were encountered: