Skip to content

chore: add Prettier formatting enforcement#386

Open
simple-agent-manager[bot] wants to merge 2 commits into
mainfrom
sam/add-linting-enforcement-defang-01krp2
Open

chore: add Prettier formatting enforcement#386
simple-agent-manager[bot] wants to merge 2 commits into
mainfrom
sam/add-linting-enforcement-defang-01krp2

Conversation

@simple-agent-manager
Copy link
Copy Markdown

Summary

  • Add Prettier as a devDependency with .prettierrc config and .prettierignore
  • Add format and format:check npm scripts
  • Format entire codebase with Prettier (121 files, separate commit)
  • Add Husky + lint-staged pre-commit hook to auto-format staged files
  • Add Claude Code PostToolUse hook (.claude/settings.json) to auto-format on Edit/Write
  • Add .claude/rules/linting.md for Claude agent guidance
  • Update AGENTS.md with formatting requirements for Codex agents

Approach

Two commits:

  1. chore: format codebase with prettier — Installs Prettier, adds config, and formats all existing files. This is the large diff.
  2. chore: add husky, lint-staged, and agent linting rules — Adds pre-commit enforcement (Husky + lint-staged), Claude Code hooks, and agent instructions.

Notes

  • Build errors in domains.mdx and managed-postgres.mdx pre-exist on main — not introduced by this PR
  • No ESLint added — Prettier is sufficient for a docs site
  • Aligns with shift-left philosophy: formatting enforced at commit time via pre-commit hooks, not in CI

Test plan

  • npx prettier --check . passes
  • Pre-commit hook verified working (lint-staged ran on second commit)
  • Build errors confirmed pre-existing on main

Generated with Claude Code

raphaeltm and others added 2 commits May 15, 2026 15:12
Add prettier as a devDependency with .prettierrc and .prettierignore
config files. Add format and format:check scripts to package.json.
Run prettier --write on the entire codebase to fix all pre-existing
formatting inconsistencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install husky and lint-staged for pre-commit formatting enforcement
- Add .husky/pre-commit hook running lint-staged
- Add lint-staged config to package.json for Prettier on staged files
- Add .claude/settings.json PostToolUse hook to auto-format on Edit/Write
- Add .claude/rules/linting.md for Claude agent guidance
- Update AGENTS.md with formatting requirements for Codex agents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simple-agent-manager simple-agent-manager Bot requested a review from a team as a code owner May 15, 2026 15:19
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.

1 participant