Skip to content

Commit c15b17f

Browse files
VinciGit00claude
andcommitted
chore: add pre-commit hooks with husky and lint-staged
Runs biome check --write on staged JS/TS/JSON files before commit, catching formatter issues like the one that broke CI on #12. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1d476b3 commit c15b17f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bunx lint-staged

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
"test": "bun test tests/",
2020
"test:integration": "bun run integration_test.ts",
2121
"check": "tsc --noEmit && biome check .",
22-
"prepublishOnly": "tsup"
22+
"prepublishOnly": "tsup",
23+
"prepare": "husky"
24+
},
25+
"lint-staged": {
26+
"*.{js,ts,jsx,tsx,json}": ["biome check --write --no-errors-on-unmatched"]
2327
},
2428
"keywords": ["scraping", "ai", "scrapegraph", "typescript", "sdk", "web-scraping", "api"],
2529
"author": "ScrapeGraph Team",
@@ -37,6 +41,8 @@
3741
"@biomejs/biome": "^1.9.4",
3842
"@types/bun": "^1.3.9",
3943
"@types/node": "^22.13.1",
44+
"husky": "^9.1.7",
45+
"lint-staged": "^16.4.0",
4046
"tsup": "^8.3.6",
4147
"typescript": "^5.8.2"
4248
}

0 commit comments

Comments
 (0)