From a17c531340a738d6db7b01c381ce0167e9152ff5 Mon Sep 17 00:00:00 2001 From: hooray <304327508@qq.com> Date: Sun, 23 Oct 2022 14:04:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=20eslint=20=E5=92=8C=20stylelint=20?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E5=A2=9E=E5=8A=A0=20--cache=20=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ .lintstagedrc | 6 +++--- package.json | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 83601d3..96742b0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ node_modules dist* dist-ssr *.local +.eslintcache +.stylelintcache src/assets/sprites/*.* !src/assets/sprites/.gitkeep public/icons diff --git a/.lintstagedrc b/.lintstagedrc index fc89276..541fa59 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,5 +1,5 @@ { - "src/**/*.{js,jsx,ts,tsx}": "eslint --fix", - "src/**/*.{css,scss}": "stylelint --fix --allow-empty-input", - "src/**/*.vue": ["eslint --fix", "stylelint --fix --allow-empty-input"] + "src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix", + "src/**/*.{css,scss}": "stylelint --cache --fix --allow-empty-input", + "src/**/*.vue": ["eslint --cache --fix", "stylelint --cache --fix --allow-empty-input"] } diff --git a/package.json b/package.json index 83ac855..5b5362f 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "new": "plop", "lint": "npm-run-all -s lint:tsc lint:eslint lint:stylelint", "lint:tsc": "vue-tsc --noEmit", - "lint:eslint": "eslint src/**/*.{ts,tsx,vue} --fix", - "lint:stylelint": "stylelint src/**/*.{css,scss,vue} --fix", + "lint:eslint": "eslint src/**/*.{ts,tsx,vue} --cache --fix", + "lint:stylelint": "stylelint src/**/*.{css,scss,vue} --cache --fix", "prepare": "husky install", "postinstall": "esno scripts/prepare.js", "preinstall": "npx only-allow pnpm"