diff --git a/package.json b/package.json index 23dff83b9..3f98cec50 100644 --- a/package.json +++ b/package.json @@ -30,21 +30,10 @@ } }, "lint-staged": { - "*.md": [ - "prettier --write" - ], - "*.{ts,tsx,js,vue,less}": [ - "prettier --write", - "git add" - ], - "*.{ts,tsx,js,vue}": [ - "eslint --fix", - "git add" - ], - "*.{vue,css,less}": [ - "stylelint --fix", - "git add" - ] + "*.md": "prettier --write", + "*.{ts,tsx,js,vue,less}": "prettier --write", + "*.{ts,tsx,js,vue}": "eslint --fix", + "*.{vue,css,less}": "stylelint --fix" }, "repository": { "type": "git", diff --git a/packages/create-vant-cli-app/generators/templates/package.json.tpl b/packages/create-vant-cli-app/generators/templates/package.json.tpl index 33b2cca71..1257aeb7c 100644 --- a/packages/create-vant-cli-app/generators/templates/package.json.tpl +++ b/packages/create-vant-cli-app/generators/templates/package.json.tpl @@ -26,14 +26,8 @@ } }, "lint-staged": { - "*.{ts,tsx,js,jsx,vue}": [ - "eslint --fix", - "git add" - ], - "*.{vue,css,less,scss}": [ - "stylelint --fix", - "git add" - ] + "*.{ts,tsx,js,jsx,vue}": "eslint --fix", + "*.{vue,css,less,scss}": "stylelint --fix" }, "peerDependencies": { "vue": "^2.6.11",