-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat(config): allow defining files via flag #201
Conversation
|
||
--not=target1,target2 An array of file/folder names or globs that you would like to ignore. Defaults to `[]`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added surrounding newlines to match pattern elsewhere
@@ -30,6 +30,7 @@ program | |||
.argument('[files...]', 'a glob of files to to test the EcmaScript version against') | |||
.option('--module', 'use ES modules') | |||
.option('--allow-hash-bang', 'if the code starts with #! treat it as a comment') | |||
.option('--files <files>', 'a glob of files to to test the EcmaScript version against (alias for [files...])') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't include the -f
short flag from the original proposal since it didn't seem to fit with the style of the other flags.
if (filesArg && filesArg.length && options.files) { | ||
logger.error('Cannot pass in both [files...] argument and --files flag at the same time!') | ||
process.exit(1) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd originally thought to have the argument override the flag, but then I could see someone misunderstanding that maybe they got concatenated and it seemed like erroring is the only safe option. Totally open to feedback on this idea or the error message text.
@merrywhether will look asap!!! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature!
Fixes
Proposed Changes
--files
flag as an alias of the[...files]
array to allow for easier overriding of.escheckrc
files.