Prettier
Quick start
Section titled “Quick start”tinkerise add prettierWhat it detects
Section titled “What it detects”The prettier module checks for existing Prettier config files, a prettier key in package.json, or an installed prettier dependency.
Config detection covers:
.prettierrc*variantsprettier.config.*variants
What it installs
Section titled “What it installs”prettier always installs:
prettier
When tailwindcss is already installed, it also adds:
prettier-plugin-tailwindcss
If only the prettier dependency exists (without config), detection marks the module as partially installed so you can standardize project scripts/config.
Generated config behavior
Section titled “Generated config behavior”- Without Tailwind: installs Prettier and scripts only
- With Tailwind: also writes
.prettierrccontaining the Tailwind plugin
File and config changes
Section titled “File and config changes”- Adds
formatscript:prettier --write . - Adds
format:checkscript:prettier --check . - Writes
.prettierrconly when Tailwind is detected
Expected outcome after tinkerise add prettier:
- Formatting commands available in
package.json - Prettier dev dependency installed
- Tailwind class sorting enabled automatically when relevant
Conflict handling
Section titled “Conflict handling”If config already exists, the executor can treat that as a conflict in interactive runs and provide diff-based accept/skip choices.