Skip to content

build: add oxlint, oxfmt, commitlint, lefthook, knip, and editorconfig configs#23

Merged
vanceingalls merged 7 commits intomainfrom
va-851/01-tooling-configs
Mar 23, 2026
Merged

build: add oxlint, oxfmt, commitlint, lefthook, knip, and editorconfig configs#23
vanceingalls merged 7 commits intomainfrom
va-851/01-tooling-configs

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Mar 23, 2026

Summary

  • Install oxlint, oxfmt, commitlint, lefthook, knip as dev dependencies
  • Add .oxlintrc.json (correctness rules + React plugin)
  • Add .oxfmtrc.json (double quotes, semicolons, 2-space indent, trailing commas)
  • Add commitlint.config.js (conventional commits)
  • Add lefthook.yml (pre-commit lint+format, commit-msg commitlint)
  • Add .editorconfig and knip.config.ts
  • Add scripts: pnpm lint, pnpm format, pnpm format:check, pnpm knip

Part 1/4 of VA-851

Test plan

  • pnpm lint runs (reports pre-existing errors, expected)
  • pnpm format:check runs (reports pre-existing diffs, expected)
  • commitlint validates and rejects messages correctly
  • lefthook hooks install via pnpm run prepare
  • pnpm knip runs

@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

VA-851 [Pre-Migration] Configure ESLint, Prettier, and conventional commits

Context

The codebase currently has no linting or formatting enforcement. Code is clean by convention, but OSS contributors need automated guardrails. Team feedback: "I love when an open source repo has this."

What to do

  1. ESLint — add configuration at monorepo root with TypeScript rules. Extend from @typescript-eslint/recommended.
  2. Prettier — add .prettierrc at root. Configure for the existing code style (double quotes, no semicolons or with — match what's already there).
  3. Conventional commits — add commitlint config enforcing conventional commit format (feat:, fix:, refactor:, etc.). This enables automated changelog generation later.
  4. Run formatter across all source files to establish baseline (single "format" commit in internal repo before port).
  5. Add lint/format scripts to root package.json: pnpm lint, pnpm format, pnpm format:check
  6. Verify all existing code passes lint + format checks with zero errors

Why before port

We want the OSS repo's first commit to already have these configs in place and all code conforming. No "fix linting" commits in public history.

@vanceingalls vanceingalls changed the title build: add oxlint, oxfmt, commitlint, lefthook, knip dependencies build: add oxlint, oxfmt, commitlint, lefthook, knip, and editorconfig configs Mar 23, 2026
@vanceingalls vanceingalls marked this pull request as ready for review March 23, 2026 18:00
@vanceingalls vanceingalls force-pushed the va-851/01-tooling-configs branch from 20a74d7 to 7dae5e2 Compare March 23, 2026 21:57
@vanceingalls vanceingalls merged commit 17e90f0 into main Mar 23, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants