Skip to content

Latest commit

History

History
88 lines (58 loc) 路 1.9 KB

File metadata and controls

88 lines (58 loc) 路 1.9 KB

Contributing

Thanks for taking the time to improve GitPulse. This guide covers commit messages guidelines and necessary checks before opening a PR.

Prerequisites

  • Use Bun as package manager.
  • Install dependencies from the repository root:
bun install

bun install also runs the prepare script, which installs the prek pre-commit hook.

Pre-Commit Checks

GitPulse uses prek for pre-commit checks. The hook configuration lives in prek.toml and currently runs:

bun run fmt:check
bun run lint

Fix any failures before committing.

Commit Messages

Commit messages should follow the Conventional Commits format:

<type>(<scope>): <description>

Use one of these types:

feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert

The scope is optional. Keep the description concise and imperative.

If you use AI to draft commit messages, you can use the conventional-commit skill.

Format and Lint

Formatting is handled by Oxfmt, and linting is handled by Oxlint.

Check formatting and linting:

bun run fmt:check
bun run lint

Apply automatic fixes:

bun run fmt
bun run lint:fix

Review the diff after automatic fixes. lint:fix may not resolve every issue; re-run bun run lint and handle remaining diagnostics manually.

The root lint script ignores extension/. Use the extension-specific commands when working on the browser extension.

Before Opening a Pull Request

Run the core quality checks from the repository root:

bun run fmt:check
bun run lint
bunx nuxi typecheck
bun test

If you changed the browser extension, also run:

bun run extension:test

Do not bypass prek unless there is an exceptional reason. If you must bypass a hook locally, run the same checks manually before pushing.