@jmlweb/prettier-config-tailwind 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @jmlweb/prettier-config-tailwind
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 4a9ece1: Update documentation to use pnpm commands instead of npm
8
+ - Updated dependencies [4a9ece1]
9
+ - @jmlweb/prettier-config-base@1.0.4
10
+
3
11
  ## 1.0.3
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
  ## 📦 Installation
17
17
 
18
18
  ```bash
19
- npm install --save-dev @jmlweb/prettier-config-tailwind prettier prettier-plugin-tailwindcss
19
+ pnpm add -D @jmlweb/prettier-config-tailwind prettier prettier-plugin-tailwindcss
20
20
  ```
21
21
 
22
22
  **Note**: The `prettier-plugin-tailwindcss` plugin must be installed as a dev dependency.
@@ -84,6 +84,32 @@ This package extends `@jmlweb/prettier-config-base` and adds:
84
84
  - And all other base settings
85
85
  - ✅ `prettier-plugin-tailwindcss` - Automatically sorts Tailwind CSS classes
86
86
 
87
+ ## 🤔 Why Use This?
88
+
89
+ > **Philosophy**: Tailwind class order should be consistent and automatic. Don't waste time manually organizing utility classes.
90
+
91
+ This package extends the base Prettier config with Tailwind-specific class sorting. Following Tailwind's recommended class order improves readability and makes it easier to scan markup quickly.
92
+
93
+ ### Design Decisions
94
+
95
+ **Automatic Class Sorting**: Uses the official `prettier-plugin-tailwindcss`
96
+
97
+ - **Why**: Tailwind's recommended order groups related utilities together (layout → spacing → typography → visual effects), making classes easier to read and understand at a glance
98
+ - **Trade-off**: Initial formatting may reorder classes you've manually organized, but consistency across the codebase outweighs individual preferences
99
+ - **When to override**: If you have a strong reason to deviate from Tailwind's official recommendations (rare)
100
+
101
+ **Plugin Load Order**: The Tailwind plugin is loaded last in Prettier's plugin chain
102
+
103
+ - **Why**: Ensures Tailwind class sorting doesn't conflict with other Prettier plugins and runs after all other formatting
104
+ - **Trade-off**: None - this is the recommended approach by Tailwind Labs
105
+ - **When to override**: Never - this is a technical requirement, not a stylistic choice
106
+
107
+ **Extends Base Config**: Inherits all settings from `@jmlweb/prettier-config-base`
108
+
109
+ - **Why**: Maintains consistency with non-Tailwind projects while adding Tailwind-specific features
110
+ - **Trade-off**: If you need to change base formatting rules, you must override the base config settings
111
+ - **When to override**: When you need different base Prettier settings than the standard config
112
+
87
113
  ## 🎯 When to Use
88
114
 
89
115
  Use this package when:
@@ -126,8 +152,8 @@ Add formatting scripts to your `package.json`:
126
152
  Then run:
127
153
 
128
154
  ```bash
129
- npm run format # Format all files
130
- npm run format:check # Check formatting without modifying files
155
+ pnpm format # Format all files
156
+ pnpm format:check # Check formatting without modifying files
131
157
  ```
132
158
 
133
159
  ## 📋 Requirements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmlweb/prettier-config-tailwind",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Prettier configuration for jmlweb projects with Tailwind CSS support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "prettier-plugin-tailwindcss": "^0.7.2",
52
- "@jmlweb/prettier-config-base": "1.0.3"
52
+ "@jmlweb/prettier-config-base": "1.0.4"
53
53
  },
54
54
  "devDependencies": {
55
55
  "prettier": "^3.3.3",