Skip to content

chore: add pre-commit hooks and enforce formatting - #10

Merged
tclancy merged 3 commits into
mainfrom
claude/pre-commit-hooks-9
May 15, 2026
Merged

chore: add pre-commit hooks and enforce formatting#10
tclancy merged 3 commits into
mainfrom
claude/pre-commit-hooks-9

Conversation

@metaframework-dispatch-bot

Copy link
Copy Markdown

Summary

  • Added .pre-commit-config.yaml with trailing-whitespace, end-of-file-fixer, check-yaml, check-json, check-merge-conflict, ESLint (scoped to src/), and Prettier (all file types, excluding build output)
  • Removed broken husky v4 configuration from package.json
  • Added dist-types/ to .gitignore (build artifacts were untracked)
  • Added lint + format check job to CI workflow
  • Auto-formatted all source, config, docs, and test fixture files with Prettier to establish a clean baseline

Notes

  • ESLint hook is scoped to src/ only (matching existing npm run lint behavior) — root-level scripts (monitor.ts, etc.) legitimately use console.log
  • 5 pre-existing test failures on main (unrelated to this PR)
  • Husky v4 was removed since pre-commit replaces it; the old hook only ran ESLint on src/ without Prettier

Test plan

  • pre-commit run --all-files passes all 7 hooks
  • npm test shows same results as main (52 passed, 5 pre-existing failures)
  • CI lint job checks ESLint + Prettier on every push/PR

Closes #9

🤖 Generated with Claude Code

dispatch-bot[bot] and others added 3 commits May 15, 2026 09:01
18 source files and 10 test/root files had formatting drift.
Running Prettier across the entire codebase to establish a clean baseline
before adding pre-commit hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .pre-commit-config.yaml with trailing-whitespace, end-of-file-fixer,
  check-yaml, check-json, check-merge-conflict, ESLint (src/ only), and
  Prettier (excluding build output and lockfile)
- Remove broken husky v4 config from package.json
- Add lint + format CI job to ci.yaml
- Add dist-types/ to .gitignore (build artifacts were untracked)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Trailing whitespace, EOF fixes, and Prettier formatting applied to
non-source files: configs (eslintrc, babel, rollup, tsconfig, jest),
docs (README, CHANGELOG, WHATS_FUEL), deployment files, and test
fixtures. Establishes a clean baseline for the new pre-commit hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tclancy
tclancy merged commit 9c953e1 into main May 15, 2026
3 checks passed
@tclancy
tclancy deleted the claude/pre-commit-hooks-9 branch May 15, 2026 14:20
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.

chore: no pre-commit config — formatting/linting not enforced

1 participant