Skip to content

Commit b54bfee

Browse files
authored
chore: add pre-commit for lint and formatting (#2)
* chore: update package.json and pnpm-lock.yaml to include husky and lint-staged for pre-commit hooks; change license to MIT * chore: update biome.json to include JSON files in the includes array * chore: format package.json and tsconfig.json for consistency and readability
1 parent 567f432 commit b54bfee

5 files changed

Lines changed: 319 additions & 73 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm run pre-commit

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
}
3333
},
3434
"files": {
35-
"includes": ["*.ts", "*.js", "src/**/*"]
35+
"includes": ["*.ts", "*.js", "*.json", "src/**/*"]
3636
}
3737
}

package.json

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,47 @@
11
{
2-
"name": "webdev-bot",
3-
"version": "1.0.0",
4-
"description": "Web Dev & Web Design discord bot",
5-
"type": "module",
6-
"scripts": {
7-
"build:ci": "tsup && node scripts/copy-assets.js",
8-
"build:dev": "pnpm run build:ts && pnpm run build:copy",
9-
"build:ts": "tsup",
10-
"build:copy": "node scripts/copy-assets.js",
11-
"start": "node dist/index.js",
12-
"dev": "tsx watch src/index.ts",
13-
"deploy": "tsx src/util/deploy.ts",
14-
"lint": "biome lint .",
15-
"lint:fix": "biome lint --fix .",
16-
"format": "biome format --write .",
17-
"check": "biome check .",
18-
"check:fix": "biome check --write .",
19-
"test": "node --test"
20-
},
21-
"keywords": [],
22-
"author": "",
23-
"license": "ISC",
24-
"packageManager": "pnpm@10.17.1+sha512.17c560fca4867ae9473a3899ad84a88334914f379be46d455cbf92e5cf4b39d34985d452d2583baf19967fa76cb5c17bc9e245529d0b98745721aa7200ecaf7a",
25-
"dependencies": {
26-
"@discordjs/core": "^2.2.2",
27-
"discord.js": "^14.22.1"
28-
},
29-
"devDependencies": {
30-
"@biomejs/biome": "2.2.4",
31-
"@types/node": "^24.5.2",
32-
"tsup": "^8.5.0",
33-
"tsx": "^4.20.6",
34-
"typescript": "^5.9.2",
35-
"zod": "^4.1.11"
36-
}
2+
"name": "webdev-bot",
3+
"version": "1.0.0",
4+
"description": "Web Dev & Web Design discord bot",
5+
"type": "module",
6+
"scripts": {
7+
"build:ci": "tsup && node scripts/copy-assets.js",
8+
"build:dev": "pnpm run build:ts && pnpm run build:copy",
9+
"build:ts": "tsup",
10+
"build:copy": "node scripts/copy-assets.js",
11+
"start": "node dist/index.js",
12+
"dev": "tsx watch src/index.ts",
13+
"deploy": "tsx src/util/deploy.ts",
14+
"lint": "biome lint .",
15+
"lint:fix": "biome lint --fix .",
16+
"format": "biome format --write .",
17+
"check": "biome check .",
18+
"check:fix": "biome check --write .",
19+
"test": "node --test",
20+
"prepare": "husky",
21+
"pre-commit": "lint-staged"
22+
},
23+
"keywords": [],
24+
"author": "",
25+
"license": "MIT",
26+
"packageManager": "pnpm@10.17.1",
27+
"dependencies": {
28+
"@discordjs/core": "^2.2.2",
29+
"discord.js": "^14.22.1"
30+
},
31+
"devDependencies": {
32+
"@biomejs/biome": "2.2.4",
33+
"@types/node": "^24.5.2",
34+
"husky": "^9.1.7",
35+
"lint-staged": "^16.2.1",
36+
"tsup": "^8.5.0",
37+
"tsx": "^4.20.6",
38+
"typescript": "^5.9.2",
39+
"zod": "^4.1.11"
40+
},
41+
"lint-staged": {
42+
"*.{ts,js}": [
43+
"biome format --write",
44+
"biome lint --fix"
45+
]
46+
}
3747
}

0 commit comments

Comments
 (0)