eslint-config-callstack icon indicating copy to clipboard operation
eslint-config-callstack copied to clipboard

Check if "node:" prefixed imports are supported

Open thymikee opened this issue 3 years ago • 1 comments

Describe the feature

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

thymikee avatar Feb 25 '22 15:02 thymikee

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"
}

zamotany avatar Feb 25 '22 15:02 zamotany