From 1779cc86130c5b20232720c508bd23a5a21b6478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=96=87=E5=8F=AF?= <1041367524@qq.com> Date: Fri, 1 Apr 2022 16:45:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20eslint=E5=90=AF=E5=8A=A8=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vite.config.js b/vite.config.js index ada91f2..e2b89d4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -89,12 +89,15 @@ export default (configEnv) => { legacy({ targets: ['defaults', 'not IE 11'], }), - eslintPlugin({ - eslintOptions: { - cache: true, - }, - shouldLint: (path) => /\/src\/[^?]*\.(vue|m?[jt]sx?)$/.test(path), - }), + { + ...eslintPlugin({ + eslintOptions: { + cache: true, + }, + shouldLint: (path) => /\/src\/[^?]*\.(vue|m?[jt]sx?)$/.test(path), + }), + enforce: 'post', + }, ], css: { preprocessorOptions: {