Skip to content

feat: add dprint code formatter with husky integration#38

Merged
ericanderson merged 4 commits intomasterfrom
feat/add-dprint-formatting
Aug 20, 2025
Merged

feat: add dprint code formatter with husky integration#38
ericanderson merged 4 commits intomasterfrom
feat/add-dprint-formatting

Conversation

@ericanderson
Copy link
Copy Markdown
Owner

Summary

This PR adds dprint as a code formatter with husky integration for automated formatting on commit.

Changes

  • ✨ Add dprint configuration for TypeScript, JavaScript, JSON, Markdown, YAML, and TOML files
  • 🪝 Add husky for git hook management
  • 🚀 Add lint-staged to run dprint on staged files only
  • ⚡ Configure pre-commit hook to automatically format code
  • 📝 Format all existing files with new configuration

Benefits

  • Consistent code formatting across the project
  • Automatic formatting on commit prevents formatting inconsistencies
  • Fast formatting with dprint's Rust-based engine
  • Only formats staged files for better performance

- Add dprint.json with TypeScript, JSON, Markdown, YAML, and other format configurations
- Add pnpm-workspace.yaml to build dprint as local dependency
- Update package.json to include dprint dev dependency and required runtime dependencies
- Configure line width to 100 characters and indent width to 2 spaces
- Exclude node_modules and lock files from formatting
- Add husky for git hook management
- Add lint-staged to run dprint on staged files only
- Configure pre-commit hook to automatically format code
- Setup runs dprint on TypeScript, JavaScript, JSON, Markdown, YAML, and TOML files
@ericanderson ericanderson force-pushed the feat/add-dprint-formatting branch from f0b07ae to 0346987 Compare August 20, 2025 13:57
@ericanderson ericanderson merged commit f59e74c into master Aug 20, 2025
3 checks passed
ericanderson added a commit that referenced this pull request Aug 20, 2025
…onfig-file-support

* origin/main:
  feat: add dprint code formatter with husky integration (#38)
  fix: add release and hotfix branch protection to local pruning (#31)
@ericanderson ericanderson deleted the feat/add-dprint-formatting branch March 24, 2026 15:33
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant