From 22ff8098e36fde137541bf3b166914b1b8bfec9b Mon Sep 17 00:00:00 2001 From: lvjiaxuan <11309921+lvjiaxuan@users.noreply.github.com> Date: Mon, 13 Mar 2023 18:06:48 +0800 Subject: [PATCH] feat: respect ignored file --- src/extension.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index 9304e35..102c4b7 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -215,6 +215,10 @@ async function disable(silent: boolean, insert: (opts: { return false } + if (await eslint.isPathIgnored(fileName)) { + return false + } + if (activeTextEditor.selections.length > 1) { log('Sorry, we can not disable multi-selections for now. It will be supported in later version.', true, 'OK') return false