Closed
Description
With the following config:
module.exports = {
"extends": ["plugin:node/recommended"],
parserOptions: {
sourceType: "module"
},
"plugins": ["node"],
"rules": {
"node/no-unsupported-features/es-builtins": ["error"]
}
};
and with this in package.json
:
"engines": {
"node": "*"
}
I get this error:
TypeError: Error while loading rule 'node/no-unsupported-features/es-syntax': Invalid Version: [object Object]
Occurred while linting /Users/brett/handle-node/rollup.config.js
Setting it to >= 0.1.14
or such works fine.
The asterisk is allowable here per https://docs.npmjs.com/files/package.json#engines , and I would think this value would still make since with this rule, e.g., to support any past Node version or just to debug and see which features one is using that are not supported.
Activity
mysticatea commentedon Apr 15, 2019
Thank you for the report.
Looks like a bug in
semver
package:intersects('*', '^1.2.3')
throws a TypeError npm/node-semver#225, A range of "*" cannot call intersects on ranges with "^" or "~" npm/node-semver#236, intersect fails using x-range wildcard npm/node-semver#266I'm waiting for fixed.
brettz9 commentedon May 23, 2019
Should no longer be blocking as of https://github.com/npm/node-semver/tree/v6.1.0
mysticatea commentedon May 23, 2019
Thank you for the notice!
So it's available now because it's a minor version up. (this depends on
semver@^6.0.0
)