Skip to content

Commit 48c83d4

Browse files
dhaneshclaude
andcommitted
chore(dev): enforce biome lint and gate it in verify + ci
Disables two style-opinion rules this codebase deliberately violates (noNonNullAssertion, noExplicitAny) — enforcing them would be disproportionate churn for no correctness gain. With the remaining rules clean, lint joins format + typecheck + test + build in `bun run verify` and blocks in the CI quality job. Removes the now-obsolete check:advisory script. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Piqz8qJ21eRpPrmWwxr6fg
1 parent 6438b8e commit 48c83d4

4 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
with:
2222
fail-on-gaps: false # Set to true to fail on non-blocking gaps
2323

24-
# Static quality gate: formatting (Biome) + typecheck both block. Linting is
25-
# advisory for now (pre-existing debt); promote it to blocking once clean.
24+
# Static quality gate: formatting, linting (Biome) and typecheck all block.
2625
quality:
27-
name: Format & Typecheck
26+
name: Format, Lint & Typecheck
2827
runs-on: ubuntu-latest
2928
steps:
3029
- uses: actions/checkout@v6
@@ -42,13 +41,12 @@ jobs:
4241
- name: Check formatting
4342
run: bun run format:check
4443

44+
- name: Lint
45+
run: bun run lint
46+
4547
- name: Typecheck
4648
run: bun run typecheck
4749

48-
- name: Lint (advisory, non-blocking)
49-
continue-on-error: true
50-
run: bun run check:advisory
51-
5250
# Run tests
5351
test:
5452
name: Tests

CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
```bash
88
bun install # Install dependencies (includes commit hooks)
9-
bun run verify # One command: format check + tests + build (the pre-PR gate)
9+
bun run verify # One command: format + lint + typecheck + tests + build
1010
bun run format # Auto-fix formatting (Biome)
1111
```
1212

1313
`bun run verify` is the single entrypoint an agent or contributor runs before a PR: it
14-
checks formatting (Biome), typechecks (`tsc --noEmit`), runs the full test suite, and
15-
rebuilds all artifacts (catching plugin-sync drift). `bun run check:advisory` runs lint,
16-
which is **advisory** today due to pre-existing debt — it reports but doesn't block. Promote
17-
it into `verify` once clean.
14+
checks formatting and lint (Biome), typechecks (`tsc --noEmit`), runs the full test suite,
15+
and rebuilds all artifacts (catching plugin-sync drift). All five gate — CI runs the same
16+
checks. `bun run format` auto-fixes formatting; `bun run lint` reports lint issues.
1817

1918
## Commit Convention
2019

biome.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
"install/**/*.ts",
1212
"lib/**/*.ts",
1313
"scripts/**/*.ts",
14-
"!**/node_modules/**",
15-
"!**/dist/**",
14+
"!**/node_modules",
15+
"!**/dist",
1616
"!**/*.bundle.js",
1717
"!**/*.generated.ts",
18-
"!plugin/**",
19-
"!**/__tests__/**/fixtures/**"
18+
"!plugin",
19+
"!**/__tests__/**/fixtures"
2020
]
2121
},
2222
"formatter": {
@@ -35,7 +35,13 @@
3535
"linter": {
3636
"enabled": true,
3737
"rules": {
38-
"recommended": true
38+
"recommended": true,
39+
"style": {
40+
"noNonNullAssertion": "off"
41+
},
42+
"suspicious": {
43+
"noExplicitAny": "off"
44+
}
3945
}
4046
}
4147
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"format:check": "biome format .",
1515
"lint": "biome lint .",
1616
"typecheck": "cd cli && bun run typecheck",
17-
"check:advisory": "echo '--- advisory (non-blocking): lint has pre-existing debt; promote to verify once clean ---' && (bun run lint || true)",
18-
"verify": "bun run format:check && bun run typecheck && bun test && bun run build:all"
17+
"verify": "bun run format:check && bun run lint && bun run typecheck && bun test && bun run build:all"
1918
},
2019
"devDependencies": {
2120
"@biomejs/biome": "^2.5.2",

0 commit comments

Comments
 (0)