Support for multiple files/glob patterns on cli.#75
Support for multiple files/glob patterns on cli.#75ginman86 wants to merge 6 commits intozaach:masterfrom
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 -cBroken 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/**/*.jsonorjsonlint somefile.json someotherfile.jsonHow to test this PR?
Pull this fork locally, and create a symlink using
npm linkinside the directory.Create a few json files and run a command similar to
jsonlint app/**/*.jsonorjsonlint somefile.json someotherfile.jsonorjsonlint *.jsonYou can also pull the fork into an existing project via
npm install ginman86/jsonlint --save-dev