Skip to content

Commit

Permalink
Replace prettier with biome, run lint on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt committed Feb 10, 2024
1 parent a3658fb commit 336705b
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 8 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: CI
on: [push, pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint

test:
strategy:
matrix:
Expand Down Expand Up @@ -75,6 +89,6 @@ jobs:
prepare: |
pkg install -y gmake python3 yarn-node${{ matrix.node-version }}
run: |
yarn install --frozen-lockfile
yarn install
yarn test
sync: sshfs
20 changes: 20 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"files": {
"include": ["*.cjs", "*.json"],
"ignore": [".vscode"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
},
"scripts": {
"build": "prebuildify --napi --strip --tag-armv --tag-libc",
"format": "prettier --write \"*.{cjs,json}\"",
"install": "node-gyp-build",
"lint": "biome check .",
"prepare": "tsc",
"test": "node --test test.cjs"
},
Expand All @@ -60,10 +60,10 @@
"node-gyp-build": "^4.8.0"
},
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"@types/node": "^20.11.17",
"node-gyp": "^10.0.1",
"prebuildify": "^6.0.0",
"prettier": "^3.2.5",
"typescript": "^5.3.3"
},
"engines": {
Expand Down
59 changes: 54 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,60 @@
# yarn lockfile v1


"@biomejs/biome@^1.5.3":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-1.5.3.tgz#0762b9f681c247a228522e6c506060e734809d48"
integrity sha512-yvZCa/g3akwTaAQ7PCwPWDCkZs3Qa5ONg/fgOUT9e6wAWsPftCjLQFPXBeGxPK30yZSSpgEmRCfpGTmVbUjGgg==
optionalDependencies:
"@biomejs/cli-darwin-arm64" "1.5.3"
"@biomejs/cli-darwin-x64" "1.5.3"
"@biomejs/cli-linux-arm64" "1.5.3"
"@biomejs/cli-linux-arm64-musl" "1.5.3"
"@biomejs/cli-linux-x64" "1.5.3"
"@biomejs/cli-linux-x64-musl" "1.5.3"
"@biomejs/cli-win32-arm64" "1.5.3"
"@biomejs/cli-win32-x64" "1.5.3"

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.5.3.tgz#8df0a562ca59b7a77151e26f67f45074644fab1c"
integrity sha512-ImU7mh1HghEDyqNmxEZBoMPr8SxekkZuYcs+gynKlNW+TALQs7swkERiBLkG9NR0K1B3/2uVzlvYowXrmlW8hw==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.5.3.tgz#ab5376f15d9e23b60ae2b0b51f7feee38a62bba2"
integrity sha512-vCdASqYnlpq/swErH7FD6nrFz0czFtK4k/iLgj0/+VmZVjineFPgevOb+Sr9vz0tk0GfdQO60bSpI74zU8M9Dw==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.3.tgz#a2ba748a6cf94e2288244294a8e36a7db153982f"
integrity sha512-DYuMizUYUBYfS0IHGjDrOP1RGipqWfMGEvNEJ398zdtmCKLXaUvTimiox5dvx4X15mBK5M2m8wgWUgOP1giUpQ==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.5.3.tgz#c805d48a4740cadd4fbdc22bf74d86b6e10ed84e"
integrity sha512-cupBQv0sNF1OKqBfx7EDWMSsKwRrBUZfjXawT4s6hKV6ALq7p0QzWlxr/sDmbKMLOaLQtw2Qgu/77N9rm+f9Rg==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.3.tgz#b524a85e46724543eb0f3eda143dd62e58d6e148"
integrity sha512-UUHiAnlDqr2Y/LpvshBFhUYMWkl2/Jn+bi3U6jKuav0qWbbBKU/ByHgR4+NBxpKBYoCtWxhnmatfH1bpPIuZMw==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-1.5.3.tgz#3934339eac9ec14307cb73541158cbf1695bfb79"
integrity sha512-YQrSArQvcv4FYsk7Q91Yv4uuu5F8hJyORVcv3zsjCLGkjIjx2RhjYLpTL733SNL7v33GmOlZY0eFR1ko38tuUw==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.5.3.tgz#db337fc521bd046015499d8bbc02835dbd93f01c"
integrity sha512-HxatYH7vf/kX9nrD+pDYuV2GI9GV8EFo6cfKkahAecTuZLPxryHx1WEfJthp5eNsE0+09STGkKIKjirP0ufaZA==

"@biomejs/[email protected]":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-1.5.3.tgz#1a424f26b709bc17fc592de18e8f48a6d2a44c86"
integrity sha512-fMvbSouZEASU7mZH8SIJSANDm5OqsjgtVXlbUqxwed6BP7uuHRSs396Aqwh2+VoW8fwTpp6ybIUoC9FrzB0kyA==

"@isaacs/cliui@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
Expand Down Expand Up @@ -574,11 +628,6 @@ prebuildify@^6.0.0:
pump "^3.0.0"
tar-fs "^2.1.0"

prettier@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==

proc-log@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8"
Expand Down

0 comments on commit 336705b

Please sign in to comment.