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
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Review `README.md` and `CONTRIBUTING.md` for all relevant repository information

- TypeScript (config files and scripts), MDX/Markdown (content).
- Prettier is configured via `@harperdb/code-guidelines/prettier` (see `package.json`).
- Format command: `npm run format:write`. Run this after editing any `.ts`, `.md`, or `.mdx` files.
- **Required before every commit/PR:** run `npm run format:write`, then confirm `npm run format:check` is clean. This is a hard gate, not advisory — CI fails any unformatted PR (see [CI](#ci)).
- Formatting applies to **every file in the repo**, not just content. Prettier runs against the whole tree (`prettier .`) — `.ts`, `.md`, `.mdx`, `.json`, and files under `plans/`, `scripts/`, etc. Do not assume a directory is exempt because it is not user-facing docs.
- The lint script is a no-op (`echo 0`); do not expect `npm run lint` to catch issues.

## Content Style
Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ npm run format:write

5. Push changes to a branch and create a pull request

## Formatting

**Every contribution must be formatted before it is committed.** This applies to _all_ files in the repository — content (`.md`/`.mdx`), TypeScript, config, and anything else under `plans/`, `scripts/`, etc. — not just docs content.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To ensure consistency with the file types listed in AGENTS.md (which explicitly mentions .ts and .json), we can explicitly list these extensions here as well. This makes it clearer to contributors which file formats are subject to formatting checks.

For example:

**Every contribution must be formatted before it is committed.** This applies to _all_ files in the repository — content (`.md`/`.mdx`), TypeScript (`.ts`), JSON (`.json`), config, and anything else under `plans/`, `scripts/`, etc. — not just docs content.


```bash
# Format everything (run before committing):
npm run format:write

# Check formatting without writing (what CI runs):
npm run format:check
```

CI runs `npm run format:check` on every pull request and will fail if anything is unformatted. If CI fails on formatting, run `npm run format:write` locally and commit the result. Prettier is configured via `@harperdb/code-guidelines/prettier` (see `package.json`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When CI fails on formatting, the contributor needs to run the format command, commit, and then push the changes back to the branch. Adding "and push" to the instructions makes the workflow complete and clear for contributors.

For example:

If CI fails on formatting, run `npm run format:write` locally, commit, and push the changes.


## Site Organization

This site is powered by Docusaurus. The documentation is split into four distinct sections, each serving a different purpose and configured as its own Docusaurus plugin instance.
Expand Down