-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
imports-as-dependencies
: Node package not found
#1112
Comments
imports-as-dependencies
] Node package not foundimports-as-dependencies
: Node package not found
Makes sense, but shouldn't |
I don't have If I add it, there's always the error. I think the rule can't make the connection between You may need to add a list of allowed imports with import { builtinModules } from "node:module";
const allowed = builtinModules.flatMap((m) => [m, "node:" + m]); Or use import { isBuiltin } from "node:module";
isBuiltin("node:http"); // true
isBuiltin("http"); // true
isBuiltin("wss"); // false |
Yes, I've already prepared a PR. I'm just wondering whether the desired behavior should require |
Since Intellisense works without |
🎉 This issue has been resolved in version 46.2.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | patch | [`46.2.4` -> `46.2.6`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/46.2.4/46.2.6) | --- ### Release Notes <details> <summary>gajus/eslint-plugin-jsdoc</summary> ### [`v46.2.6`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v46.2.6) [Compare Source](gajus/eslint-plugin-jsdoc@v46.2.5...v46.2.6) ##### Bug Fixes - **`imports-as-dependencies`:** do not log missing package.json when rule is not active; fixes [#​1117](gajus/eslint-plugin-jsdoc#1117) ([3a5dd7d](gajus/eslint-plugin-jsdoc@3a5dd7d)) ### [`v46.2.5`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v46.2.5) [Compare Source](gajus/eslint-plugin-jsdoc@v46.2.4...v46.2.5) ##### Bug Fixes - **`imports-as-dependencies`:** support Node builtins; fixes [#​1112](gajus/eslint-plugin-jsdoc#1112) ([ab00592](gajus/eslint-plugin-jsdoc@ab00592)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjExOC4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1933 Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Expected behavior
imports-as-dependencies
should support Node package (e.g.http
,fs
,path
).Actual behavior
imports-as-dependencies
reports: import points to package which is not found in dependenciesFiles
package.json
tsconfig.json
index.js
To reproduce
npx eslint index.js
Environment
eslint-plugin-jsdoc
version: 46.2.4Additional info
npx tsc
support Node package (no error reported).@typedef {import("http").Server} Server
(withoutnode:
prefix).The text was updated successfully, but these errors were encountered: