Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v6
with:
version: 10

- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: pnpm typecheck

- run: pnpm test

- run: pnpm build # fail if the bundle no longer builds
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules/
dist/
coverage/
*.DS_Store
.claude/
.vscode/
better-github.zip
8 changes: 0 additions & 8 deletions .vscode/settings.json

This file was deleted.

16 changes: 16 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ Use `pnpm`, not npm or yarn.
pnpm build
```

## Test

Vitest, with `happy-dom`. Tests live next to the code as `*.test.ts`.

```sh
pnpm test # run once
pnpm test:watch # watch mode
pnpm test:coverage # run with v8 coverage report (coverage/index.html)
```

- Coverage thresholds (`vitest.config.ts`) are a **floor to guard against
regressions**, meant to be ratcheted up — not a target to pad. They only
apply under `--coverage`, so plain `pnpm test` (CI) is unaffected.
- Prefer tests that assert observable behavior over ones that merely execute
code for coverage. Coverage proves code *ran*, not that it was *verified*.

## Guidelines

- Avoid modifying GitHub's original DOM structure. Prefer appending new elements or using CSS overrides.
Loading