-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli): use
util.parseArgs
to parse arguments (#283)
* feat: use util.parseArgs * refactor: destrucure argument in parseCLIArguments This moved argument destructuring to the parseCliArguments function, renames values to options, renames positionals to patterns, and moves the try catch to the run function * refactor: move default pattern to parseCliArgument * fix: typo isQuiet->shouldBeQuiet * fix: show help on illegal option value * test: added tests for illegal argument usage * feat: add support for --no-check and --no-quiet * Revert "feat: add support for --no-check and --no-quiet" This reverts commit 10a6067. * test: add tests which throw for --no-* arguments * test: update tests * test: update snapshots * style: linting * refactor: use `Object.hasOwn` --------- Co-authored-by: fisker Cheung <[email protected]>
- Loading branch information
Showing
7 changed files
with
258 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.