diff --git a/.husky/pre-commit b/.husky/pre-commit index 366296977e..d2ae35e84b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,3 @@ . "$(dirname "$0")/_/husky.sh" yarn lint-staged -yarn tsc --noEmit diff --git a/lint-staged.config.js b/lint-staged.config.js new file mode 100644 index 0000000000..3e24293e8e --- /dev/null +++ b/lint-staged.config.js @@ -0,0 +1,7 @@ +module.exports = { + "src/**/*.{js,jsx,ts,tsx,json}": [ + "eslint --fix --max-warnings 0", + "prettier --write", + ], + "src/**/*.{ts,tsx}": () => "tsc --noEmit", +}; diff --git a/package.json b/package.json index 2d4ddc8f10..4d9f627191 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,6 @@ "build-storybook": "build-storybook", "prepare": "husky install" }, - "lint-staged": { - "src/**/*.{js,jsx,ts,tsx,json}": [ - "eslint --fix --max-warnings 0", - "prettier --write" - ] - }, "dependencies": { "@babel/runtime": "^7.15.4", "@bitcoin-design/bitcoin-icons-react": "^0.1.9",