Navigation Menu

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

Add choices option #228

Merged
merged 11 commits into from Mar 24, 2023
Merged

Conversation

tommy-mitchell
Copy link
Contributor

@tommy-mitchell tommy-mitchell commented Mar 21, 2023

Closes #171. Continues from #183. Improves the error messages, adds tests cases, and aggregates option validation error messages.

Currently the choices array isn't validated to be the same type as the flag.

There were a couple of days in between starting and creating this PR, so I may have missed something.

test/test.js Outdated Show resolved Hide resolved
test/test.js Outdated Show resolved Hide resolved
@tommy-mitchell
Copy link
Contributor Author

Updated with kebab-cased flags in errors and choices type validation.

@sindresorhus sindresorhus merged commit 149d7af into sindresorhus:main Mar 24, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

Add choices option
2 participants