Skip to content

Commit 6610ec6

Browse files
committed
Use Biome in hooks, shells, scripts, and CI
1 parent 7b1a6ab commit 6610ec6

File tree

5 files changed

+10
-18
lines changed

5 files changed

+10
-18
lines changed

.github/workflows/automation.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: pnpm run ts:check
2525

2626
formatting:
27-
name: Check formatting
27+
name: Lint
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout code
@@ -39,8 +39,8 @@ jobs:
3939
cache: pnpm
4040
- name: Install dependencies
4141
run: pnpm install
42-
- name: Check formatting
43-
run: pnpm run prettier:check
42+
- name: Lint
43+
run: pnpm run check
4444

4545
tests:
4646
name: Test

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npm run prettier:check
4+
pnpm run check --staged --no-errors-on-unmatched

flake.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
flake-utils.lib.eachDefaultSystem (system:
44
let pkgs = import nixpkgs { inherit system; };
55
in {
6-
devShells.default = pkgs.mkShell {
6+
devShells.default = pkgs.mkShellNoCC {
77
buildInputs = with pkgs; [
88
nodejs_latest
99
# The pnpm in nixpkgs is out of date, so we instead rely on Corepack
1010
# to provide pnpm
1111
corepack_latest
1212
nodePackages_latest.typescript-language-server
1313
nodePackages_latest.vscode-json-languageserver
14+
# Forces Biome to run as a statically-linked musl binary
15+
musl
1416

1517
# Dependencies for building canvas
1618
python3

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"classnames": "^2.3.2",
99
"esbuild-runner": "^2.2.2",
1010
"husky": "^8.0.0",
11-
"prettier": "^3.0.0",
1211
"typescript": "^5.2.2",
1312
"vite": "^4.4.9",
1413
"vite-plugin-require-transform": "^1.0.21",
@@ -21,8 +20,9 @@
2120
"scripts": {
2221
"prepare": "husky install && bash ./.husky/post-checkout",
2322
"postinstall": "pnpm run codegen",
24-
"prettier:check": "pnpm exec prettier -c --cache .",
25-
"prettier:format": "pnpm exec prettier -w .",
23+
"format": "pnpm exec biome format",
24+
"lint": "pnpm exec biome lint",
25+
"check": "pnpm exec biome check",
2626
"cli": "pnpm exec esr src/cli.ts",
2727
"cli:debug": "node --inspect-brk -r esbuild-runner/register src/cli.ts",
2828
"bot": "pnpm exec esr src/bot/main.ts",

pnpm-lock.yaml

-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)