Any possibility to use arbitrary node (gulp) tasks, not just CLI?
See original GitHub issueI’m falling in love with lint-staged and the whole idea. It was nice so far with stylelint and eslint. But i’m in need of running arbitrary checks on staged files. Like, checking BEM methodology in HTML, or dist files sizes. I wrote couple of tasks with gulp, they are checking all the files. But that is surely slow on big projects.
I tried this:
scripts: {
"lint": "gulp check"
},
"pre-commit": "lint",
But obviously the task did not receive list of staged files.
I’ve read all the issues, and saw there were some plans of integrating that into lint-staged (#8 ?). Or am i wrong? Or there are reasons it would not be implemented? (Or is there any help needed? I could possible do that.) Or is there any workaround to use lint-staged with gulp
task for example (i suppose the problem is to give to that task the list of staged files to run on).
Sorry for so many questions, but i hope you get my idea anyway.
And thank you again for a great tool! 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
@akella it’s actaully a great feedback and I might consider adding templates for commands earlier. Something I was planning to do either way at some time point.
Yes, sure! Go ahead and create a docs PR!