-
-
Notifications
You must be signed in to change notification settings - Fork 425
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: read config from stdin #918
Conversation
Codecov Report
@@ Coverage Diff @@
## master #918 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 18 18
Lines 608 609 +1
Branches 143 143
=========================================
+ Hits 608 609 +1
Continue to review full report at Codecov.
|
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.
What's your use-case for this feature? I'm fine with it, but the PR still needs some work. 👍
I'd like to be able to pipe in a config from the output of a previous command. So, the simplest example: |
@iiroj, made your requested changes. Also scoped the new error message more tightly to just a read error on stdin and let |
Thoughts, @okonet? Ready to merge, IMO. |
Thanks for the PR, @dsanders11! |
🎉 This PR is included in version 10.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Went back and forth on whether to put the functionality in
bin/lint-staged.js
orlib/index.js
. Decided onbin/lint-staged.js
since it doesn't make full sense to include in the programmatic API since the library user can read the config from wherever they'd like and provide it as an object.