Skip to content

Commit ffdfa62

Browse files
committed
build: switch to oxfmt and oxlint
1 parent 8193cfb commit ffdfa62

8 files changed

Lines changed: 110 additions & 202 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- run: bun install --frozen-lockfile
2424
- run: bun run typecheck
2525
- run: bun run lint
26+
- run: bun run format:check
2627
- run: bun test
2728
- run: bun run build
2829
- run: bun run contrast-test

‎.oxfmtrc.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80
4+
}

‎.oxlintrc.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error"
5+
}
6+
}

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ consumer's data layer, not in a component — data arrives as props.
2828
```sh
2929
bun run build # tsc (JS + types) → Tailwind
3030
bun run typecheck # tsc --noEmit
31-
bun run lint # eslint .
31+
bun run lint # oxlint
32+
bun run format:check # oxfmt --check (`bun run format` rewrites)
3233
bun run dep-guard # forbidden-import checks over src/
3334
```
3435

35-
All four must be clean before a change lands. There is no CI in this repository yet, so
36+
All five must be clean before a change lands. There is no CI in this repository yet, so
3637
running them locally is the only thing standing between a change and a release.
3738
`typecheck` is not negotiable and `any` is not a way past it: the escapes that exist each
3839
carry a comment explaining why the type system leaves no alternative, and a new one needs

‎IMPLEMENTATION.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Source imports are relative and carry `.js` extensions. There is no path
3333
alias. `prepack` runs the build. CI runs `contrast-test` (reads `dist/styles.css`)
3434
and `dep-guard` after it.
3535

36-
Other scripts: `bun run typecheck`, `bun run lint` (eslint),
36+
Other scripts: `bun run typecheck`, `bun run lint` (oxlint), `bun run format` / `format:check` (oxfmt),
3737
`bun run dep-guard` (`scripts/dep-guard.mjs` — fails if any file imports
3838
`@workbench/*`), `bun test`, `bun run stories` / `stories:build`
3939
([Ladle](https://ladle.dev) over `stories/`).

‎bun.lock‎

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

‎eslint.config.mjs‎

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

‎package.json‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
"build:css": "tailwindcss -i src/styles.css -o dist/styles.css && cp src/theme.css dist/theme.css",
3535
"typecheck": "tsc --noEmit",
3636
"test": "bun test",
37-
"lint": "eslint .",
37+
"lint": "oxlint",
38+
"format": "oxfmt",
39+
"format:check": "oxfmt --check",
3840
"dep-guard": "node scripts/dep-guard.mjs",
3941
"contrast-test": "node scripts/contrast-test.mjs",
4042
"stories": "ladle serve --host 127.0.0.1",
@@ -71,7 +73,6 @@
7173
}
7274
},
7375
"devDependencies": {
74-
"@eslint/js": "^9.39.1",
7576
"@happy-dom/global-registrator": "^20.11.2",
7677
"@ladle/react": "^5.1.1",
7778
"@radix-ui/react-dialog": "^1.1.15",
@@ -84,14 +85,14 @@
8485
"@types/node": "^24.9.1",
8586
"@types/react": "^19.2.2",
8687
"@types/react-dom": "^19.2.1",
87-
"eslint": "^9.39.1",
8888
"lucide-react": "^1.27.0",
89+
"oxfmt": "^0.70.0",
90+
"oxlint": "^1.85.0",
8991
"react": "^19.2.0",
9092
"react-dom": "^19.2.0",
9193
"sonner": "^2.0.7",
9294
"tailwindcss": "^4.3.3",
93-
"typescript": "^5.9.3",
94-
"typescript-eslint": "^8.46.2"
95+
"typescript": "^5.9.3"
9596
},
9697
"exports": {
9798
".": {

0 commit comments

Comments
 (0)