Skip to content

Error with engines set to asterisk #155

Closed
@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.

Activity

brettz9

brettz9 commented on May 23, 2019

@brettz9
Author

Should no longer be blocking as of https://github.com/npm/node-semver/tree/v6.1.0

mysticatea

mysticatea commented on May 23, 2019

@mysticatea
Owner

Thank you for the notice!

So it's available now because it's a minor version up. (this depends on semver@^6.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @brettz9@mysticatea

        Issue actions

          Error with `engines` set to asterisk · Issue #155 · mysticatea/eslint-plugin-node