Thanks for your interest in improving faultline! This document covers the workflow for the monorepo.
- Bun (the version is pinned in
package.jsonunderpackageManager) - Node.js >= 18 (the published packages target Node 18+; CI verifies on 18/20/22)
git clone https://github.com/danfry1/faultline.git
cd faultline
bun install| Package | Published as | Status |
|---|---|---|
packages/faultline |
faultline |
stable |
packages/eslint-plugin-faultline |
eslint-plugin-faultline |
stable |
packages/faultline-cli |
faultline-cli |
beta |
packages/faultline-vscode |
— (Marketplace, not npm) | experimental |
examples/, playground/, and test/fixtures/ are development-only and are not published.
Run from the repo root:
bun run typecheck # tsc --noEmit across every package
bun run test # all tests; packages/faultline enforces a coverage gate
bun run lint # oxlint
bun run build # build all packagesPer-package: bun --filter '<package-name>' <script>.
- Use Bun's test runner (
bun:test). - Core (
packages/faultline) enforces a coverage threshold viapackages/faultline/bunfig.toml. New code paths need tests, or coverage will drop below the gate and CI will fail. - The ESLint plugin is guarded by a "torture" fixture corpus in
packages/eslint-plugin-faultline/test/torture/. When you change a rule, add or update a fixture category. Patterns the rules intentionally can't handle belong inLIMITATIONS.md.
packages/faultline/test/typecheck.ts holds Expect/Equal type assertions. If you change public types, update these — they are checked by bun run typecheck.
We version and publish with Changesets. If your change affects a published package's behavior, API, or packaging, add a changeset:
bun run changesetPick the affected package(s) and a bump type. For pre-1.0 packages, treat breaking changes as minor and everything else as patch. Commit the generated file in .changeset/ with your PR.
Docs-only or internal-only changes (CI, tests, examples) don't need a changeset.
- Branch off
main. - Make your change with tests.
- Ensure
bun run typecheck && bun run test && bun run lint && bun run buildall pass. - Add a changeset if applicable.
- Open the PR against
mainand fill out the template.
Maintainers merge changeset PRs; a "Version Packages" PR is opened automatically and publishing happens on merge.
By participating you agree to abide by our Code of Conduct.