Skip to content

Commit 336705b

Browse files
committed
Replace prettier with biome, run lint on CI
1 parent a3658fb commit 336705b

File tree

4 files changed

+91
-8
lines changed

4 files changed

+91
-8
lines changed

.github/workflows/ci.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Install dependencies
15+
run: yarn install --frozen-lockfile
16+
17+
- name: Lint
18+
run: yarn lint
19+
620
test:
721
strategy:
822
matrix:
@@ -75,6 +89,6 @@ jobs:
7589
prepare: |
7690
pkg install -y gmake python3 yarn-node${{ matrix.node-version }}
7791
run: |
78-
yarn install --frozen-lockfile
92+
yarn install
7993
yarn test
8094
sync: sshfs

biome.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
3+
"files": {
4+
"include": ["*.cjs", "*.json"],
5+
"ignore": [".vscode"]
6+
},
7+
"formatter": {
8+
"indentStyle": "space",
9+
"indentWidth": 2
10+
},
11+
"organizeImports": {
12+
"enabled": true
13+
},
14+
"linter": {
15+
"enabled": true,
16+
"rules": {
17+
"recommended": true
18+
}
19+
}
20+
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
},
5050
"scripts": {
5151
"build": "prebuildify --napi --strip --tag-armv --tag-libc",
52-
"format": "prettier --write \"*.{cjs,json}\"",
5352
"install": "node-gyp-build",
53+
"lint": "biome check .",
5454
"prepare": "tsc",
5555
"test": "node --test test.cjs"
5656
},
@@ -60,10 +60,10 @@
6060
"node-gyp-build": "^4.8.0"
6161
},
6262
"devDependencies": {
63+
"@biomejs/biome": "^1.5.3",
6364
"@types/node": "^20.11.17",
6465
"node-gyp": "^10.0.1",
6566
"prebuildify": "^6.0.0",
66-
"prettier": "^3.2.5",
6767
"typescript": "^5.3.3"
6868
},
6969
"engines": {

yarn.lock

+54-5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22
# yarn lockfile v1
33

44

5+
"@biomejs/biome@^1.5.3":
6+
version "1.5.3"
7+
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.3.tgz#0762b9f681c247a228522e6c506060e734809d48"
8+
integrity sha512-yvZCa/g3akwTaAQ7PCwPWDCkZs3Qa5ONg/fgOUT9e6wAWsPftCjLQFPXBeGxPK30yZSSpgEmRCfpGTmVbUjGgg==
9+
optionalDependencies:
10+
"@biomejs/cli-darwin-arm64" "1.5.3"
11+
"@biomejs/cli-darwin-x64" "1.5.3"
12+
"@biomejs/cli-linux-arm64" "1.5.3"
13+
"@biomejs/cli-linux-arm64-musl" "1.5.3"
14+
"@biomejs/cli-linux-x64" "1.5.3"
15+
"@biomejs/cli-linux-x64-musl" "1.5.3"
16+
"@biomejs/cli-win32-arm64" "1.5.3"
17+
"@biomejs/cli-win32-x64" "1.5.3"
18+
19+
"@biomejs/[email protected]":
20+
version "1.5.3"
21+
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.3.tgz#8df0a562ca59b7a77151e26f67f45074644fab1c"
22+
integrity sha512-ImU7mh1HghEDyqNmxEZBoMPr8SxekkZuYcs+gynKlNW+TALQs7swkERiBLkG9NR0K1B3/2uVzlvYowXrmlW8hw==
23+
24+
"@biomejs/[email protected]":
25+
version "1.5.3"
26+
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.3.tgz#ab5376f15d9e23b60ae2b0b51f7feee38a62bba2"
27+
integrity sha512-vCdASqYnlpq/swErH7FD6nrFz0czFtK4k/iLgj0/+VmZVjineFPgevOb+Sr9vz0tk0GfdQO60bSpI74zU8M9Dw==
28+
29+
"@biomejs/[email protected]":
30+
version "1.5.3"
31+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.3.tgz#a2ba748a6cf94e2288244294a8e36a7db153982f"
32+
integrity sha512-DYuMizUYUBYfS0IHGjDrOP1RGipqWfMGEvNEJ398zdtmCKLXaUvTimiox5dvx4X15mBK5M2m8wgWUgOP1giUpQ==
33+
34+
"@biomejs/[email protected]":
35+
version "1.5.3"
36+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.3.tgz#c805d48a4740cadd4fbdc22bf74d86b6e10ed84e"
37+
integrity sha512-cupBQv0sNF1OKqBfx7EDWMSsKwRrBUZfjXawT4s6hKV6ALq7p0QzWlxr/sDmbKMLOaLQtw2Qgu/77N9rm+f9Rg==
38+
39+
"@biomejs/[email protected]":
40+
version "1.5.3"
41+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.3.tgz#b524a85e46724543eb0f3eda143dd62e58d6e148"
42+
integrity sha512-UUHiAnlDqr2Y/LpvshBFhUYMWkl2/Jn+bi3U6jKuav0qWbbBKU/ByHgR4+NBxpKBYoCtWxhnmatfH1bpPIuZMw==
43+
44+
"@biomejs/[email protected]":
45+
version "1.5.3"
46+
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.3.tgz#3934339eac9ec14307cb73541158cbf1695bfb79"
47+
integrity sha512-YQrSArQvcv4FYsk7Q91Yv4uuu5F8hJyORVcv3zsjCLGkjIjx2RhjYLpTL733SNL7v33GmOlZY0eFR1ko38tuUw==
48+
49+
"@biomejs/[email protected]":
50+
version "1.5.3"
51+
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.3.tgz#db337fc521bd046015499d8bbc02835dbd93f01c"
52+
integrity sha512-HxatYH7vf/kX9nrD+pDYuV2GI9GV8EFo6cfKkahAecTuZLPxryHx1WEfJthp5eNsE0+09STGkKIKjirP0ufaZA==
53+
54+
"@biomejs/[email protected]":
55+
version "1.5.3"
56+
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.3.tgz#1a424f26b709bc17fc592de18e8f48a6d2a44c86"
57+
integrity sha512-fMvbSouZEASU7mZH8SIJSANDm5OqsjgtVXlbUqxwed6BP7uuHRSs396Aqwh2+VoW8fwTpp6ybIUoC9FrzB0kyA==
58+
559
"@isaacs/cliui@^8.0.2":
660
version "8.0.2"
761
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
@@ -574,11 +628,6 @@ prebuildify@^6.0.0:
574628
pump "^3.0.0"
575629
tar-fs "^2.1.0"
576630

577-
prettier@^3.2.5:
578-
version "3.2.5"
579-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
580-
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
581-
582631
proc-log@^3.0.0:
583632
version "3.0.0"
584633
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8"

0 commit comments

Comments
 (0)