-
Notifications
You must be signed in to change notification settings - Fork 65
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
Strict mode: suggest solutions when throwing errors #45
Comments
I like this idea!
Isn't using levenshtein distance almost easier than something more manual, as it's just a dependency away? |
Merged
PR submitted: #50 |
tuannm151
pushed a commit
to BSSCommerce/shopify-envalid
that referenced
this issue
Jul 1, 2024
tuannm151
pushed a commit
to BSSCommerce/shopify-envalid
that referenced
this issue
Jul 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If an env var was accessed that's not in the schema, but is in process.env, we can suggest adding a validator for that var
If an accessed env var was not in the validated object, but a similar one was (ie. the error was likely a typo), we can suggest the similar env var name. We don't have to anything fancy like calculating the levenshtein distance; for now could just check if:
The text was updated successfully, but these errors were encountered: