-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Rule suggestion: prefer node:
prefixed imports when possible
#77
Comments
node:
prefixed imports when possible #344node:
prefixed imports when possible
yes, good to have. 👍 |
There is a rule like this in |
A general question: Would such a rule be better in https://github.com/import-js/eslint-plugin-import? I resorted to using edit: Or maybe not as eslint-plugin-import is for generic ECMAScript Module imports both for the web and Node.js, so maybe such a rule is more suited here after all. |
I think it should be here as well |
Can we cut a release? CC @aladdin-add |
We are in the development of the new major v17. I'll try to port it to v16 later. |
Older built-in Node modules such as fs now can be imported via either their name or node: + their name:
The prefixed versions are nice because they can't be overridden by user modules and are similarly formatted to to prefix-only modules such as node:test.
Suggestion: let's add a linter rule to enforce using them, with an auto-fixer.
(copied from mysticatea#344)
The text was updated successfully, but these errors were encountered: