chore: add Prettier configuration with Tailwind plugin#4
Conversation
Add comprehensive Prettier setup to enforce consistent code formatting across the monorepo. **Configuration:** - Add .prettierrc.json with standard formatting rules - Install prettier-plugin-tailwindcss for automatic class sorting - Configure tailwindFunctions for cn() and cva() utilities - Add custom overrides for Markdown (prose wrap) and JSON files **Ignore patterns:** - Add .prettierignore to exclude build outputs, dependencies, and generated files - Exclude database files, migrations, and lock files from formatting **Formatting updates:** - Apply Tailwind class sorting to all TSX components - Format all Markdown documentation files - Ensure consistent code style across 25+ files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review: Prettier Configuration with Tailwind PluginSummaryThis PR adds comprehensive Prettier configuration with the Tailwind CSS plugin to enforce consistent code formatting across the monorepo. Overall, this is a well-executed infrastructure improvement that will benefit the codebase long-term. ✅ Strengths1. Excellent Configuration Choices
2. Comprehensive
|
Move prettier-plugin-tailwindcss dependency to the pnpm catalog for centralized version management across the monorepo. Changes: - Add prettier-plugin-tailwindcss@^0.6.14 to pnpm-workspace.yaml catalog - Update package.json to use catalog: reference - Update pnpm-lock.yaml Quality checks: - ✅ Lint passed on all packages - ✅ Build passed on all packages - ✅ Prettier still works correctly with catalog reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Pull Request Review: Prettier Configuration with Tailwind PluginOverall Assessment: APPROVED WITH MINOR SUGGESTIONSThis is a well-executed PR that adds comprehensive Prettier configuration to enforce consistent code formatting across the monorepo. Code Quality & Best Practices - Strengths
Potential Issues & ConcernsTailwind Class Ordering Issue in Button ComponentLocation: packages/ui/src/components/button/button.tsx:8 The base button variant classes are on a single, extremely long line that is hard to read and maintain. The ordering appears unusual with state classes (focus-visible, aria-invalid) appearing before base layout classes. Expected Tailwind ordering: layout → display → positioning → sizing → spacing → typography → visual → states Recommendation: Consider using template literals with multiple lines for better readability in cva() calls, or verify this is the intended output from the plugin. Performance ConsiderationsNo Performance Concerns - Prettier is a dev-time tool with no runtime impact. Tailwind class ordering is purely aesthetic and doesn't affect bundle size. Security ConcernsNo Security Issues - Dependencies are from trusted sources. .prettierignore correctly excludes .env files. Test CoverageQuality checks mentioned in commit: Lint passed, Build passed, Prettier works with catalog reference. Recommendations:
Style & Convention AdherenceFollows Project Conventions - Aligns with monorepo structure, consistent with existing tooling, proper separation of concerns. Final Score: 9.2/10 - Excellent contribution!
Suggested Next Steps
Great work on improving code consistency across the monorepo! This will significantly reduce formatting-related merge conflicts and make the codebase more maintainable. Review generated by Claude Code |
Summary
Configuration Details
.prettierrc.json
cn()andcva().prettierignore
Excludes:
Changes
.prettierrc.json,.prettierignoreprettier-plugin-tailwindcss@^0.6.14Benefits
✅ Consistent code formatting across the monorepo
✅ Automatic Tailwind class sorting (improves readability and reduces conflicts)
✅ IDE integration for format-on-save
✅ CI-ready configuration for automated checks
Test Plan
pnpm formatsuccessfully across all files🤖 Generated with Claude Code