From ecda3e017441093c83a4b2e6c082653eb0ee5c39 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 25 Oct 2018 09:16:21 +0200 Subject: [PATCH] feat(lint-staged): add formatting changes before testing (#3595) So there won't be stylistic diffs between files and index if the test fails. --- scripts/lint-staged | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/lint-staged b/scripts/lint-staged index ba070398c..22f8fe1c3 100755 --- a/scripts/lint-staged +++ b/scripts/lint-staged @@ -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)