In my case, I want to run Eslint on all the Git staged files.
git diff --diff-filter=d --cached --name-only | grep -E '\.jsx?$
outputs:
changedFile1.js
changedFile2.js
I want to pass them to Eslint to generate the command:
node_modules/.bin/eslint changedFile1.js changedFile2.js
How would I do this?
So far, the only solution I've found is to loop through the changed files and then call Eslint for each changed file. However, this is much slower than calling Eslint once with all the changed files.
I'm using Ubuntu 16.04.