Skip to content

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

Open
@kellyselden

Description

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?

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions