Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The official `prettier-plugin-tailwindcss` does not support Latte. This plugin f
npm install -D prettier-plugin-latte-tailwindcss
```

Peer dependencies: `prettier >= 3.0.0`. For class sorting, you also need `@tailwindcss/node >= 4.0.0`.
Peer dependencies: `prettier >= 3.0.0` and `@tailwindcss/node >= 4.0.0`.

Minimal `.prettierrc`:

Expand Down
2 changes: 0 additions & 2 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ If omitted, the plugin uses a default `@import "tailwindcss"` internally, which
- You use **custom `@source` directives** or theme presets
- Your CSS entry point imports additional stylesheets that affect class order

If omitted and `@tailwindcss/node` is not installed, class sorting is disabled entirely (the plugin still formats Latte templates).

## `tailwindClassRegex`

**Type:** `string` · **Default:** `""` (empty — auto-detect)
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@
"url": "https://github.com/zipper/prettier-plugin-latte-tailwindcss/issues"
},
"peerDependencies": {
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
"@tailwindcss/node": {
"optional": true
}
"prettier": ">=3.0.0",
"@tailwindcss/node": ">=4.0.0"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function doLoad(
} catch {
console.warn(
'[prettier-plugin-latte-tailwindcss] @tailwindcss/node not found — class sorting disabled.\n' +
'Install it: npm install --save-dev @tailwindcss/node'
'This is a required peer dependency. Install it: npm install --save-dev @tailwindcss/node'
)
return null
}
Expand Down