diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 index 89bec27a..2312dc58 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,6 +1 @@ -# .husky/pre-commit -prettier $(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') --write --ignore-unknown -git update-index --again - -# Add linting -npm run lint +npx lint-staged diff --git a/package.json b/package.json index 03dbc982..9e1b1fac 100644 --- a/package.json +++ b/package.json @@ -22,15 +22,12 @@ }, "keywords": [], "author": "Logan Yang", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { "*.{js,jsx,ts,tsx,json,css,md}": [ - "prettier --write", - "git add" + "prettier --write" + ], + "*.{js,jsx,ts,tsx}": [ + "eslint --fix --no-warn-ignored" ] }, "license": "AGPL-3.0",