eslint-config-callstack
eslint-config-callstack copied to clipboard
Check if "node:" prefixed imports are supported
Describe the feature
Make sure the config doesn't choke on import * as fs from 'node:fs' and alike.
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"
}