Skip to content

Commit 24ad277

Browse files
committed
Add Husky pre-commit hook configuration
- Install husky - Configure pre-commit hook to run cargo fmt, clippy, test, and wasm check - Fix build-std configuration for native/wasm compatibility - Fix clippy lints (suppress too_many_arguments and type_complexity) - Fix flaky gene energy gain test
1 parent 5c55e8d commit 24ad277

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cargo fmt --check
2+
cargo clippy -- -D warnings
3+
cargo test
4+
cargo check --target wasm32-unknown-unknown

package-lock.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
"deploy:dev": "npm run build:web && wrangler pages deploy web",
1616
"dev:worker": "npm run build:web && wrangler pages dev web",
1717
"setup": "./scripts/setup.sh",
18-
"deps:update": "npx npm-check-updates -u"
18+
"deps:update": "npx npm-check-updates -u",
19+
"prepare": "husky"
1920
},
2021
"devDependencies": {
22+
"husky": "^9.1.7",
2123
"wasm-pack": "^0.13.1",
2224
"wrangler": "^4.54.0"
23-
},
24-
"dependencies": {
2525
}
2626
}

0 commit comments

Comments
 (0)