-
Notifications
You must be signed in to change notification settings - Fork 418
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 for multiple files/glob patterns on cli. #75
base: master
Are you sure you want to change the base?
Conversation
👍 |
👍 |
Fix this and get it live? Seems critical to the functionality of |
Thanks for this fork. There is an issue however. If one of your glob patterns finds no matches the CLI breaks with:
I think unmatched directories should simply be ignored instead of thrown. |
Added a few updates that should address the comments. Almost 3 years to the day 🍾 Cheers. |
Any updates to this? This is really useful feature. |
I'd also love to see this implemented! For anyone wanting a workaround in the mean time here's what I went with: find . -iname '*.json' -not -path './.git/*' -not -path './node_modules/*' | xargs -L 1 jsonlint -q -c Broken down:
|
What does this PR do?
This PR allows for a list of files, or a glob pattern to be used on the jsonlint cli.
Ex.
jsonlint app/**/*.json
orjsonlint somefile.json someotherfile.json
How to test this PR?
Pull this fork locally, and create a symlink using
npm link
inside the directory.Create a few json files and run a command similar to
jsonlint app/**/*.json
orjsonlint somefile.json someotherfile.json
orjsonlint *.json
You can also pull the fork into an existing project via
npm install ginman86/jsonlint --save-dev