@creowis/pretty-code
v1.0.0
Published
Opinionated Prettier config for React, Next.js and Node projects
Readme
@creowis/pretty-code
Opinionated Prettier initializer for modern JavaScript projects. Supports Node.js, React, Next.js, TypeScript, HTML, CSS and Tailwind.
✨ Features
- Clean, sensible Prettier defaults
- Automatic import sorting
- Tailwind class sorting
- Node & Next.js presets
- Detects npm / yarn / pnpm automatically
- Creates
prettier.config.js - Creates
.prettierignore - Adds
formatandformat:checkscripts - Optional instant project formatting
- Zero manual config writing
🚀 Quick Start
npx @creowis/pretty-code nextor
npx @creowis/pretty-code node⚠️ Important Notes
Note: If your project already has an existing Prettier configuration file (
.prettierrc,.prettierrc.json,.prettierrc.js, orprettier.config.js), this package may not work as expected. Please remove or backup your existing Prettier config before using this tool.Support for merging with existing configurations will be added in a future release.
📦 What Happens Automatically
The CLI will:
- Install Prettier and required plugins
- Create
prettier.config.js(if not exists) - Create
.prettierignore(if not exists) - Inject formatting scripts into
package.json - Ask if you want to format the project immediately
📂 Available Presets
Base
npx @creowis/pretty-code baseNode
npx @creowis/pretty-code nodeNext.js
npx @creowis/pretty-code next🧪 Formatting Commands
npm run format
npm run format:check
npx prettier --write <file>📄 License
MIT
