Skip to content

Commit

Permalink
Merge pull request #307 from alchemix-finance/chore/husky
Browse files Browse the repository at this point in the history
CHORE: Add husky
  • Loading branch information
t0rbik authored Dec 10, 2024
2 parents 469372f + 59c81c9 commit f41e114
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {
],
"react/prop-types": "off",
"react-compiler/react-compiler": "error",
"react-refresh/only-export-components": "off",
},
settings: {
react: { version: "detect" },
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
echo "Executing pre-commit scripts"

vitest run
pnpm pre-commit
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"test": "vitest",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"prepare": "husky",
"pre-commit": "lint-staged"
},
"dependencies": {
"@ethersproject/bignumber": "^5.7.0",
Expand Down Expand Up @@ -72,6 +74,8 @@
"eslint-plugin-react-compiler": "19.0.0-beta-6fc168f-20241025",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"postcss": "^8.4.39",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
Expand All @@ -86,5 +90,14 @@
"overrides": {
"cross-spawn": "7.0.5"
}
},
"lint-staged": {
"**/*.(ts|tsx|js)": [
"bash -c tsc --noEmit",
"pnpm lint"
],
"**/*.json": [
"pnpm prettier --write"
]
}
}
Loading

0 comments on commit f41e114

Please sign in to comment.