Skip to content
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

Check if "node:" prefixed imports are supported #242

Open
thymikee opened this issue Feb 25, 2022 · 1 comment
Open

Check if "node:" prefixed imports are supported #242

thymikee opened this issue Feb 25, 2022 · 1 comment

Comments

@thymikee
Copy link
Member

Describe the feature

Make sure the config doesn't choke on import * as fs from 'node:fs' and alike.

@zamotany
Copy link
Contributor

From a quick test, the node: prefix in imports is handled properly as long as ESLint in runned by Node 14 or newer. This also includes ESLint extension in VS Code which by defaults runs under Node 12 and will report an error.

The workaround for now (until VS Code upgrades Node) is to customize runtime option of ESLint extension:

{
  "eslint.runtime": "node" // will use default node, make sure it's Node 14 or newer
}

or

{
  "eslint.runtime": "/path/to/node"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants