mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
958 stars 167 forks source link

use is-core-module@^2.3.0 to support node: scheme #277

Closed kevinoid closed 3 years ago

kevinoid commented 3 years ago

As requested in #275, recognize Node.js core modules referenced using the node: URL scheme.

Since resolve.isCore was moved to is-core-module in https://github.com/browserify/resolve/commit/7c26483576f7a44573ddc61cd5d51519deb674c5 and is-core-module@2.3.0 added support for node: in https://github.com/inspect-js/is-core-module/commit/73412230a769f6e81c05eea50b6520cebf54ed2f require is-core-module@^2.3.0.

Note: is-core-module checks whether the module is supported in a given Node.js version (if not provided, the current version is checked). Although checking whether a name is a core module in all Node.js versions supported by the package would be ideal, it will require significantly more design and implementation work and is therefore not included in this commit.

Fixes: #275

Thanks for considering, Kevin

sosukesuzuki commented 3 years ago

You mention #257 in the description, isn't it correctly #275?

kevinoid commented 3 years ago

You mention #257 in the description, isn't it correctly #275?

Yes indeed. Thanks @sosukesuzuki, good catch!

Fixed and rebased on current master (c4a37a6).

misha-erm commented 2 years ago

Hello, when can we expect this to be published?

Thanks in advance

cc: @sosukesuzuki