Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

chore: run biome as a pre-commit hook (#2493)

Martin Adámekebe9a8d24f26
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100644
index 000000000..b4da9a057
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+yarn format
diff --git a/package.json b/package.json
index 9678e205a..0f5bc7d9a 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,8 @@
"lint": "eslint \"packages/**/*.ts\" \"test/**/*.ts\"",
"lint:fix": "eslint \"packages/**/*.ts\" \"test/**/*.ts\" --fix",
"format": "biome format --write .",
- "format:check": "biome format ."
+ "format:check": "biome format .",
+ "prepare": "husky"
},
"devDependencies": {
"@apify/eslint-config-ts": "^0.4.0",
@@ -97,7 +98,7 @@
"gen-esm-wrapper": "^1.1.3",
"globby": "^14.0.0",
"got": "^13.0.0",
- "husky": "^8.0.1",
+ "husky": "^9.0.11",
"is-ci": "^3.0.1",
"lerna": "^8.0.0",
"lint-staged": "^15.0.0",
diff --git a/yarn.lock b/yarn.lock
index a333fb449..a0bfc97af 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -805,7 +805,7 @@ __metadata:
gen-esm-wrapper: "npm:^1.1.3"
globby: "npm:^14.0.0"
got: "npm:^13.0.0"
- husky: "npm:^8.0.1"
+ husky: "npm:^9.0.11"
is-ci: "npm:^3.0.1"
lerna: "npm:^8.0.0"
lint-staged: "npm:^15.0.0"
@@ -6674,12 +6674,12 @@ __metadata:
languageName: node
linkType: hard
-"husky@npm:^8.0.1":
- version: 8.0.3
- resolution: "husky@npm:8.0.3"
+"husky@npm:^9.0.11":
+ version: 9.0.11
+ resolution: "husky@npm:9.0.11"
bin:
- husky: lib/bin.js
- checksum: 10c0/6722591771c657b91a1abb082e07f6547eca79144d678e586828ae806499d90dce2a6aee08b66183fd8b085f19d20e0990a2ad396961746b4c8bd5bdb619d668
+ husky: bin.mjs
+ checksum: 10c0/2c787dcf74a837fc9a4fea7da907509d4bd9a289f4ea10ecc9d86279e4d4542b0f5f6443a619bccae19e265f2677172cc2b86aae5c932a35a330cc227d914605
languageName: node
linkType: hard