feat(lint-staged): add formatting changes before testing (#3595)

So there won't be stylistic diffs between files and index if the test fails.
This commit is contained in:
Julien Fontanet 2018-10-25 09:16:21 +02:00 committed by Pierre Donias
parent 8342bb2bc8
commit ecda3e0174

View File

@ -74,6 +74,8 @@ if (unstaged.length !== 0) {
}
}
testFiles(files)
// add formatting changes so that even if the test fails, there won't be
// stylistic diffs between files and index
run('git', ['add'].concat(files))
testFiles(files)