Skip to content

Commit 8ce05ec

Browse files
committed
chore: switch to lefthook/biome
1 parent 684ebb9 commit 8ce05ec

File tree

9 files changed

+243
-29
lines changed

9 files changed

+243
-29
lines changed

.github/workflows/default.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@ on:
66
- main
77
paths:
88
- ".github/workflows/**"
9+
- ".vscode/**"
910
- "config/**"
1011
- "images/**"
1112
- "snippets/**"
1213
- "src/**"
1314
- "syntaxes/**"
15+
- "biome.jsonc"
1416
- "package.json"
1517
- "pnpm-lock.yaml"
1618
pull_request:
1719
branches:
1820
- main
1921
paths:
2022
- ".github/workflows/**"
23+
- ".vscode/**"
2124
- "config/**"
2225
- "images/**"
2326
- "snippets/**"
2427
- "src/**"
2528
- "syntaxes/**"
29+
- "biome.jsonc"
2630
- "package.json"
2731
- "pnpm-lock.yaml"
2832
workflow_dispatch:

.husky/commit-msg

Lines changed: 0 additions & 1 deletion
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

biome.jsonc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"files": {
7+
"ignore": [
8+
"lib/**",
9+
"node_modules/**",
10+
"package.json",
11+
"pnpm-lockfile.yaml"
12+
]
13+
},
14+
"linter": {
15+
"enabled": true,
16+
"rules": {
17+
"recommended": true
18+
}
19+
},
20+
"formatter": {
21+
"useEditorconfig": true
22+
},
23+
"javascript": {
24+
"formatter": {
25+
"lineWidth": 120,
26+
"quoteStyle": "single"
27+
}
28+
}
29+
}

eslint.config.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

lefthook.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
commit-msg:
2+
commands:
3+
commitlint:
4+
run: npx --no -- commitlint --edit $1
5+
6+
pre-commit:
7+
commands:
8+
biome:
9+
run: |
10+
npx biome check \
11+
--config-path=biome.jsonc \
12+
--fix \
13+
--no-errors-on-unmatched \
14+
--reporter=summary \
15+
--staged \
16+
--vcs-enabled=true \
17+
--vcs-use-ignore-file=true

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"vscode-get-config": "^0.4.0"
4444
},
4545
"devDependencies": {
46+
"@biomejs/biome": "^1.9.4",
4647
"@commitlint/cli": "^19.8.0",
4748
"@commitlint/config-conventional": "^19.8.0",
4849
"@eslint/js": "^9.25.1",
@@ -55,6 +56,7 @@
5556
"gulp-raster": "^0.2.0",
5657
"gulp-rename": "^2.0.0",
5758
"husky": "^9.1.7",
59+
"lefthook": "^1.11.12",
5860
"prettier": "^3.5.3",
5961
"tsup": "^8.4.0",
6062
"typescript": "^5.8.3",

pnpm-lock.yaml

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

prettier.config.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)