diff --git a/.husky/pre-commit b/.husky/pre-commit index 91edfd4..d37daa0 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -./node_modules/.bin/pretty-quick --staged +npx --no-install lint-staged diff --git a/.lintstagedrc b/.lintstagedrc new file mode 100644 index 0000000..a3e5f8b --- /dev/null +++ b/.lintstagedrc @@ -0,0 +1,5 @@ +{ + "*.{js,jsx,tsx,ts,less,md,json}": [ + "prettier --write" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 1d79d77..76c5f8e 100644 --- a/package.json +++ b/package.json @@ -9,18 +9,16 @@ "watch:base": "lerna exec \"tsbb watch src/*.tsx --use-babel --use-vue\" --scope @vue-monorepo-template/base", "prettier": "prettier --write \"**/*.{js,jsx,vue,tsx,ts,less,md,json}\"", "version": "lerna version --exact --force-publish --no-push --no-git-tag-version", - "clean": "lerna clean --yes", - "hoist": "lerna bootstrap --hoist", - "bootstrap": "lerna bootstrap --force-local --no-ci" + "clean": "lerna clean --yes" }, "author": "jaywcjlove", "license": "MIT", "devDependencies": { "husky": "^8.0.3", - "prettier": "^2.8.7", - "pretty-quick": "^3.1.3", - "lerna": "^6.6.1", - "tsbb": "^4.1.1" + "lerna": "^7.4.1", + "lint-staged": "^15.0.2", + "prettier": "^3.0.3", + "tsbb": "^4.2.3" }, "engines": { "node": ">=16.0.0"