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

Support ECMA-262 regular expressions #119

Open
joshuacc opened this issue Sep 2, 2022 · 0 comments
Open

Support ECMA-262 regular expressions #119

joshuacc opened this issue Sep 2, 2022 · 0 comments

Comments

@joshuacc
Copy link

joshuacc commented Sep 2, 2022

Thanks for this package, it has been extremely helpful in one of my projects at work!

The only limitation I've run into that has cause me a bit of grief is the lack of support for ECMA-262 regular expressions. My specific use case is that I want to exclude strings that end with a certain file name.

{
  "type": "string",
  "description": "The path to an action's folder. Must begin with either `./` or `../`. Must not include `action.jsonc`.",
  "pattern": "^\\.{1,2}\\/.+(?<!action\\.jsonc)$"
}

I could, of course, write some custom code to enforce that. However, then we'd lose access to the excellent validation error highlighting in VS Code for that particular part of the schema.

image

I've read through the discussion in #47 , and it seems that the only barrier here is in importing an ECMA-262 compatible regular expression library. If that's right, it seems like a small price to pay to improve interoperability.

Thoughts?

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