@jmlweb/prettier-config-tailwind 1.0.0 → 1.0.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +49 -19
  3. package/package.json +19 -21
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # @jmlweb/prettier-config-tailwind
2
+
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 21918eb: Standardize repository field format to object format across all packages and configure syncpack to preserve it.
8
+ - Updated dependencies [21918eb]
9
+ - @jmlweb/prettier-config-base@1.0.2
10
+
11
+ ## 1.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - 2208f74: Standardize repository field format to object format across all packages and configure syncpack to preserve it.
16
+ - Updated dependencies [2208f74]
17
+ - @jmlweb/prettier-config-base@1.0.1
package/README.md CHANGED
@@ -82,7 +82,33 @@ This package extends `@jmlweb/prettier-config-base` and adds:
82
82
  - And all other base settings
83
83
  - ✅ `prettier-plugin-tailwindcss` - Automatically sorts Tailwind CSS classes
84
84
 
85
- ## 🔧 Usage with Scripts
85
+ ## 🎯 When to Use
86
+
87
+ Use this package when:
88
+
89
+ - ✅ You're using Tailwind CSS in your project
90
+ - ✅ You want consistent class ordering across your codebase
91
+ - ✅ You want to follow Tailwind's recommended class order
92
+ - ✅ You want automatic class sorting on save/format
93
+
94
+ **For projects without Tailwind**, use [`@jmlweb/prettier-config-base`](../prettier-config-base) instead.
95
+
96
+ ## 🔧 Extending the Configuration
97
+
98
+ You can extend this config for project-specific needs:
99
+
100
+ ```javascript
101
+ // .prettierrc.js
102
+ const tailwindConfig = require('@jmlweb/prettier-config-tailwind');
103
+
104
+ module.exports = {
105
+ ...tailwindConfig,
106
+ // Override or add specific options
107
+ printWidth: 100,
108
+ };
109
+ ```
110
+
111
+ ## 📝 Usage with Scripts
86
112
 
87
113
  Add formatting scripts to your `package.json`:
88
114
 
@@ -95,33 +121,37 @@ Add formatting scripts to your `package.json`:
95
121
  }
96
122
  ```
97
123
 
98
- ## 🎯 When to Use
124
+ Then run:
99
125
 
100
- Use this package when:
126
+ ```bash
127
+ npm run format # Format all files
128
+ npm run format:check # Check formatting without modifying files
129
+ ```
101
130
 
102
- - You're using Tailwind CSS in your project
103
- - ✅ You want consistent class ordering across your codebase
104
- - ✅ You want to follow Tailwind's recommended class order
105
- - ✅ You want automatic class sorting on save/format
131
+ ## 📋 Requirements
106
132
 
107
- For projects without Tailwind, use [`@jmlweb/prettier-config-base`](../prettier-config-base) instead.
133
+ - **Node.js** >= 18.0.0
134
+ - **Prettier** >= 3.0.0
108
135
 
109
- ## 🔗 Related Packages
136
+ ## 📦 Peer Dependencies
110
137
 
111
- - [`@jmlweb/prettier-config-base`](../prettier-config-base) - Base Prettier configuration (extended by this package)
112
- - [`@jmlweb/eslint-config-base`](../eslint-config-base) - ESLint config for TypeScript projects
138
+ This package requires the following peer dependencies:
113
139
 
114
- ## ⚠️ Important Notes
140
+ - `prettier` (>= 3.0.0)
141
+ - `prettier-plugin-tailwindcss` (latest)
115
142
 
116
- 1. **Plugin Installation**: Make sure `prettier-plugin-tailwindcss` is installed. It's a peer dependency.
117
- 2. **Class Ordering**: The plugin uses Tailwind's recommended class order. This may differ from your current ordering.
118
- 3. **Performance**: The plugin must be loaded last in Prettier's plugin chain (it handles this automatically).
143
+ **Note**: The `prettier-plugin-tailwindcss` plugin must be installed. The plugin uses Tailwind's recommended class order and must be loaded last in Prettier's plugin chain (handled automatically).
119
144
 
120
- ## 📝 Requirements
145
+ ## 📚 Examples
121
146
 
122
- - **Node.js** >= 18.0.0
123
- - **Prettier** >= 3.0.0
124
- - **prettier-plugin-tailwindcss** (peer dependency)
147
+ See real-world usage examples:
148
+
149
+ - [`example-react-typescript-app`](../../apps/example-react-typescript-app) - React TypeScript app with Tailwind CSS
150
+
151
+ ## 🔗 Related Packages
152
+
153
+ - [`@jmlweb/prettier-config-base`](../prettier-config-base) - Base Prettier configuration (extended by this package)
154
+ - [`@jmlweb/eslint-config-base`](../eslint-config-base) - ESLint config for TypeScript projects
125
155
 
126
156
  ## 📄 License
127
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmlweb/prettier-config-tailwind",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Prettier configuration for jmlweb projects with Tailwind CSS support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,31 +8,27 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
- "require": {
12
- "types": "./dist/index.d.cts",
13
- "default": "./dist/index.cjs"
14
- },
15
11
  "import": {
16
12
  "types": "./dist/index.d.ts",
17
13
  "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
18
  }
19
19
  }
20
20
  },
21
21
  "files": [
22
22
  "dist",
23
- "README.md"
23
+ "README.md",
24
+ "CHANGELOG.md"
24
25
  ],
25
- "scripts": {
26
- "build": "tsup",
27
- "clean": "rm -rf dist",
28
- "prepublishOnly": "pnpm build"
29
- },
30
26
  "keywords": [
27
+ "code-formatter",
31
28
  "prettier",
32
29
  "prettier-config",
33
30
  "tailwind",
34
- "tailwindcss",
35
- "code-formatter"
31
+ "tailwindcss"
36
32
  ],
37
33
  "author": "jmlweb",
38
34
  "license": "MIT",
@@ -40,9 +36,7 @@
40
36
  "type": "git",
41
37
  "url": "https://github.com/jmlweb/tooling.git"
42
38
  },
43
- "bugs": {
44
- "url": "https://github.com/jmlweb/tooling/issues"
45
- },
39
+ "bugs": "https://github.com/jmlweb/tooling/issues",
46
40
  "homepage": "https://github.com/jmlweb/tooling/tree/main/packages/prettier-config-tailwind#readme",
47
41
  "engines": {
48
42
  "node": ">=18.0.0"
@@ -54,13 +48,17 @@
54
48
  "prettier": "^3.0.0"
55
49
  },
56
50
  "dependencies": {
57
- "@jmlweb/prettier-config-base": "workspace:*",
58
- "prettier-plugin-tailwindcss": "^0.6.9"
51
+ "prettier-plugin-tailwindcss": "^0.7.2",
52
+ "@jmlweb/prettier-config-base": "1.0.2"
59
53
  },
60
54
  "devDependencies": {
61
- "@jmlweb/tsconfig-internal": "workspace:*",
62
55
  "prettier": "^3.3.3",
63
56
  "tsup": "^8.5.1",
64
- "typescript": "^5.9.3"
57
+ "typescript": "^5.9.3",
58
+ "@jmlweb/tsconfig-internal": "0.0.1"
59
+ },
60
+ "scripts": {
61
+ "build": "tsup",
62
+ "clean": "rm -rf dist"
65
63
  }
66
- }
64
+ }