Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show actual incorrect constant rather than "const must be equal to constant" #162

Open
kellyselden opened this issue Dec 30, 2022 · 0 comments

Comments

@kellyselden
Copy link

I know we are using the raw message and just passing it along:

engines: {
  type: 'object',
  properties: {
    node: {
      const: '>=18.12.0',
    },
  },
  required: ['node'],
},
  33 |   "engines": {
> 34 |     "node": ">=18.12.1"
     |             ^^^^^^^^^^^ 👈🏽  const must be equal to constant
  35 |   },

but I wonder if we could do better. We already know the constant value from the schema, could we not include that in the error message? Or is that outside the scope of this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant