Skip to content

Error with engines set to asterisk #155

@brettz9

Description

@brettz9

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions