From 142c6f225087207ec4c63b7847795857d567ce40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=80=E7=AD=96=E7=AD=96?= Date: Tue, 14 Feb 2023 01:28:15 +0800 Subject: [PATCH] fix: disable stash by default when using diff option (#1259) --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 85420f546..7fdbebccc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -75,7 +75,8 @@ const lintStaged = async ( quiet = false, relative = false, shell = false, - stash = true, + // Stashing should be disabled by default when the `diff` option is used + stash = diff === undefined, verbose = false, } = {}, logger = console