@jmlweb/prettier-config-base 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.
- package/CHANGELOG.md +13 -0
- package/README.md +42 -18
- package/package.json +17 -19
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @jmlweb/prettier-config-base
|
|
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
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2208f74: Standardize repository field format to object format across all packages and configure syncpack to preserve it.
|
package/README.md
CHANGED
|
@@ -86,7 +86,34 @@ function greet(user) {
|
|
|
86
86
|
}
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
##
|
|
89
|
+
## 🎯 When to Use
|
|
90
|
+
|
|
91
|
+
Use this package when you want:
|
|
92
|
+
|
|
93
|
+
- ✅ Consistent code formatting across projects
|
|
94
|
+
- ✅ Zero-configuration Prettier setup
|
|
95
|
+
- ✅ Modern JavaScript/TypeScript formatting defaults
|
|
96
|
+
- ✅ Foundation for extending with framework-specific configs
|
|
97
|
+
|
|
98
|
+
**For Tailwind CSS projects**, use [`@jmlweb/prettier-config-tailwind`](../prettier-config-tailwind) instead.
|
|
99
|
+
|
|
100
|
+
## 🔧 Extending the Configuration
|
|
101
|
+
|
|
102
|
+
You can extend this config for project-specific needs:
|
|
103
|
+
|
|
104
|
+
```javascript
|
|
105
|
+
// .prettierrc.js
|
|
106
|
+
const baseConfig = require('@jmlweb/prettier-config-base');
|
|
107
|
+
|
|
108
|
+
module.exports = {
|
|
109
|
+
...baseConfig,
|
|
110
|
+
// Override or add specific options
|
|
111
|
+
printWidth: 100,
|
|
112
|
+
arrowParens: 'always',
|
|
113
|
+
};
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 📝 Usage with Scripts
|
|
90
117
|
|
|
91
118
|
Add formatting scripts to your `package.json`:
|
|
92
119
|
|
|
@@ -106,32 +133,29 @@ npm run format # Format all files
|
|
|
106
133
|
npm run format:check # Check formatting without modifying files
|
|
107
134
|
```
|
|
108
135
|
|
|
109
|
-
##
|
|
136
|
+
## 📋 Requirements
|
|
110
137
|
|
|
111
|
-
|
|
138
|
+
- **Node.js** >= 18.0.0
|
|
139
|
+
- **Prettier** >= 3.0.0
|
|
112
140
|
|
|
113
|
-
|
|
114
|
-
// .prettierrc.js
|
|
115
|
-
const baseConfig = require('@jmlweb/prettier-config-base');
|
|
141
|
+
## 📦 Peer Dependencies
|
|
116
142
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
143
|
+
This package requires the following peer dependency:
|
|
144
|
+
|
|
145
|
+
- `prettier` (>= 3.0.0)
|
|
146
|
+
|
|
147
|
+
## 📚 Examples
|
|
148
|
+
|
|
149
|
+
See real-world usage examples:
|
|
150
|
+
|
|
151
|
+
- [`example-nodejs-typescript-api`](../../apps/example-nodejs-typescript-api) - Node.js TypeScript API example
|
|
152
|
+
- [`example-nodejs-javascript`](../../apps/example-nodejs-javascript) - Node.js JavaScript example
|
|
124
153
|
|
|
125
154
|
## 🔗 Related Packages
|
|
126
155
|
|
|
127
156
|
- [`@jmlweb/prettier-config-tailwind`](../prettier-config-tailwind) - Adds Tailwind CSS class sorting
|
|
128
157
|
- [`@jmlweb/eslint-config-base`](../eslint-config-base) - ESLint config that works seamlessly with this Prettier config
|
|
129
158
|
|
|
130
|
-
## 📝 Requirements
|
|
131
|
-
|
|
132
|
-
- **Node.js** >= 18.0.0
|
|
133
|
-
- **Prettier** >= 3.0.0
|
|
134
|
-
|
|
135
159
|
## 📄 License
|
|
136
160
|
|
|
137
161
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmlweb/prettier-config-base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Base Prettier configuration for jmlweb projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -8,29 +8,25 @@
|
|
|
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
|
-
"prettier-config"
|
|
33
|
-
"code-formatter"
|
|
29
|
+
"prettier-config"
|
|
34
30
|
],
|
|
35
31
|
"author": "jmlweb",
|
|
36
32
|
"license": "MIT",
|
|
@@ -38,9 +34,7 @@
|
|
|
38
34
|
"type": "git",
|
|
39
35
|
"url": "https://github.com/jmlweb/tooling.git"
|
|
40
36
|
},
|
|
41
|
-
"bugs":
|
|
42
|
-
"url": "https://github.com/jmlweb/tooling/issues"
|
|
43
|
-
},
|
|
37
|
+
"bugs": "https://github.com/jmlweb/tooling/issues",
|
|
44
38
|
"homepage": "https://github.com/jmlweb/tooling/tree/main/packages/prettier-config-base#readme",
|
|
45
39
|
"engines": {
|
|
46
40
|
"node": ">=18.0.0"
|
|
@@ -52,9 +46,13 @@
|
|
|
52
46
|
"prettier": "^3.0.0"
|
|
53
47
|
},
|
|
54
48
|
"devDependencies": {
|
|
55
|
-
"@jmlweb/tsconfig-internal": "workspace:*",
|
|
56
49
|
"prettier": "^3.3.3",
|
|
57
50
|
"tsup": "^8.5.1",
|
|
58
|
-
"typescript": "^5.9.3"
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"@jmlweb/tsconfig-internal": "0.0.1"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup",
|
|
56
|
+
"clean": "rm -rf dist"
|
|
59
57
|
}
|
|
60
|
-
}
|
|
58
|
+
}
|