@kitschpatrol/prettier-config 5.5.0 → 5.7.0
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/bin/cli.js +4 -4
- package/package.json +16 -15
- package/readme.md +19 -19
package/bin/cli.js
CHANGED
|
@@ -5138,7 +5138,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
5138
5138
|
var yargs_default = Yargs;
|
|
5139
5139
|
|
|
5140
5140
|
// ../../package.json
|
|
5141
|
-
var version = "5.
|
|
5141
|
+
var version = "5.7.0";
|
|
5142
5142
|
|
|
5143
5143
|
// ../../src/execa-utilities.ts
|
|
5144
5144
|
function isErrorExecaError(error) {
|
|
@@ -5184,7 +5184,7 @@ function stringify(passedObj, options = {}) {
|
|
|
5184
5184
|
).slice(2, -3);
|
|
5185
5185
|
const maxLength = indent === "" ? Infinity : options.maxLength === void 0 ? 80 : options.maxLength;
|
|
5186
5186
|
let { replacer } = options;
|
|
5187
|
-
return function _stringify(obj, currentIndent, reserved) {
|
|
5187
|
+
return (function _stringify(obj, currentIndent, reserved) {
|
|
5188
5188
|
if (obj && typeof obj.toJSON === "function") {
|
|
5189
5189
|
obj = obj.toJSON();
|
|
5190
5190
|
}
|
|
@@ -5250,7 +5250,7 @@ ${currentIndent}`
|
|
|
5250
5250
|
}
|
|
5251
5251
|
}
|
|
5252
5252
|
return string;
|
|
5253
|
-
}(passedObj, "", 0);
|
|
5253
|
+
})(passedObj, "", 0);
|
|
5254
5254
|
}
|
|
5255
5255
|
|
|
5256
5256
|
// ../../src/json-utilities.ts
|
|
@@ -5876,7 +5876,7 @@ var commandDefinition = {
|
|
|
5876
5876
|
description: "Kitschpatrol's Prettier shared configuration tools.",
|
|
5877
5877
|
logColor: "blue",
|
|
5878
5878
|
logPrefix: "[Prettier]",
|
|
5879
|
-
name: "
|
|
5879
|
+
name: "ksc-prettier",
|
|
5880
5880
|
order: 9
|
|
5881
5881
|
};
|
|
5882
5882
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/prettier-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Prettier configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
7
7
|
"prettier-config",
|
|
8
8
|
"prettier",
|
|
9
9
|
"cli",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"ksc",
|
|
11
|
+
"ksc-prettier"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/kitschpatrol/shared-config/tree/main/packages/prettier-config",
|
|
14
14
|
"bugs": "https://github.com/kitschpatrol/shared-config/issues",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"main": "dist/index.js",
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"bin": {
|
|
36
|
-
"kpi-prettier": "bin/cli.js"
|
|
36
|
+
"kpi-prettier": "bin/cli.js",
|
|
37
|
+
"ksc-prettier": "bin/cli.js"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|
|
39
40
|
"bin/*",
|
|
@@ -42,27 +43,27 @@
|
|
|
42
43
|
],
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@pinojs/json-colorizer": "^4.0.0",
|
|
45
|
-
"@prettier/plugin-php": "^0.
|
|
46
|
+
"@prettier/plugin-php": "^0.24.0",
|
|
46
47
|
"@prettier/plugin-ruby": "^4.0.4",
|
|
47
|
-
"@prettier/plugin-xml": "^3.4.
|
|
48
|
+
"@prettier/plugin-xml": "^3.4.2",
|
|
48
49
|
"cosmiconfig": "^9.0.0",
|
|
49
50
|
"cosmiconfig-typescript-loader": "^6.1.0",
|
|
50
51
|
"deepmerge-ts": "^7.1.5",
|
|
51
52
|
"execa": "^9.6.0",
|
|
52
53
|
"find-workspaces": "^0.3.1",
|
|
53
|
-
"fs-extra": "^11.3.
|
|
54
|
-
"prettier": "^3.
|
|
54
|
+
"fs-extra": "^11.3.1",
|
|
55
|
+
"prettier": "^3.6.2",
|
|
55
56
|
"prettier-plugin-astro": "^0.14.1",
|
|
56
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
57
|
-
"prettier-plugin-sh": "^0.
|
|
58
|
-
"prettier-plugin-sql": "^0.19.
|
|
57
|
+
"prettier-plugin-packagejson": "^2.5.19",
|
|
58
|
+
"prettier-plugin-sh": "^0.18.0",
|
|
59
|
+
"prettier-plugin-sql": "^0.19.2",
|
|
59
60
|
"prettier-plugin-svelte": "^3.4.0",
|
|
60
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
61
|
-
"prettier-plugin-toml": "^2.0.
|
|
62
|
-
"sort-package-json": "^3.
|
|
61
|
+
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
62
|
+
"prettier-plugin-toml": "^2.0.6",
|
|
63
|
+
"sort-package-json": "^3.4.0"
|
|
63
64
|
},
|
|
64
65
|
"engines": {
|
|
65
|
-
"node": ">=20.
|
|
66
|
+
"node": ">=20.19.0"
|
|
66
67
|
},
|
|
67
68
|
"publishConfig": {
|
|
68
69
|
"access": "public"
|
package/readme.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
24
|
-
It's a shared [Prettier](https://prettier.io) config, plus a command-line tool `
|
|
24
|
+
It's a shared [Prettier](https://prettier.io) config, plus a command-line tool `ksc-prettier` to perform Prettier-related project initialization, linting, and fixing.
|
|
25
25
|
|
|
26
26
|
<!-- recommendation -->
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ It's a shared [Prettier](https://prettier.io) config, plus a command-line tool `
|
|
|
29
29
|
>
|
|
30
30
|
> **You can use this package on its own, but it's recommended to use [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
|
|
31
31
|
>
|
|
32
|
-
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `
|
|
32
|
+
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `ksc` command
|
|
33
33
|
|
|
34
34
|
<!-- /recommendation -->
|
|
35
35
|
|
|
@@ -52,7 +52,7 @@ To use just this Prettier config in isolation:
|
|
|
52
52
|
3. Add the starter `.prettierrc.js` and `.prettierignore` files to your project root, and add any customizations you'd like:
|
|
53
53
|
|
|
54
54
|
```sh
|
|
55
|
-
pnpm exec
|
|
55
|
+
pnpm exec ksc-prettier init
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
## Usage
|
|
@@ -66,20 +66,20 @@ Integrate with your `package.json` scripts as you see fit, for example:
|
|
|
66
66
|
```json
|
|
67
67
|
{
|
|
68
68
|
"scripts": {
|
|
69
|
-
"lint": "
|
|
70
|
-
"fix": "
|
|
69
|
+
"lint": "ksc-prettier lint",
|
|
70
|
+
"fix": "ksc-prettier fix"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
You might need to pass certain plugins in explicitly if you're calling `prettier` directly. The `
|
|
75
|
+
You might need to pass certain plugins in explicitly if you're calling `prettier` directly. The `ksc-prettier fix` and `ksc-prettier lint` scripts take care of this for you.
|
|
76
76
|
|
|
77
77
|
### Configuration
|
|
78
78
|
|
|
79
79
|
To create a `prettier.config.js` in your project root:
|
|
80
80
|
|
|
81
81
|
```sh
|
|
82
|
-
pnpm exec
|
|
82
|
+
pnpm exec ksc-prettier init
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
(Note that this will delete the `prettier` property in your `package.json`!)
|
|
@@ -89,7 +89,7 @@ _Or_
|
|
|
89
89
|
To create a `prettier` property in `package.json`:
|
|
90
90
|
|
|
91
91
|
```sh
|
|
92
|
-
pnpm exec
|
|
92
|
+
pnpm exec ksc-prettier init --location package
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
(Note that this will delete the `prettier.config.js` file in your project root!)
|
|
@@ -98,16 +98,16 @@ pnpm exec kpi-prettier init --location package
|
|
|
98
98
|
|
|
99
99
|
<!-- cli-help -->
|
|
100
100
|
|
|
101
|
-
#### Command: `
|
|
101
|
+
#### Command: `ksc-prettier`
|
|
102
102
|
|
|
103
103
|
Kitschpatrol's Prettier shared configuration tools.
|
|
104
104
|
|
|
105
|
-
This section lists top-level commands for `
|
|
105
|
+
This section lists top-level commands for `ksc-prettier`.
|
|
106
106
|
|
|
107
107
|
Usage:
|
|
108
108
|
|
|
109
109
|
```txt
|
|
110
|
-
|
|
110
|
+
ksc-prettier <command>
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
| Command | Argument | Description |
|
|
@@ -124,14 +124,14 @@ kpi-prettier <command>
|
|
|
124
124
|
|
|
125
125
|
_See the sections below for more information on each subcommand._
|
|
126
126
|
|
|
127
|
-
#### Subcommand: `
|
|
127
|
+
#### Subcommand: `ksc-prettier init`
|
|
128
128
|
|
|
129
129
|
Initialize by copying starter config files to your project root or to your package.json file.
|
|
130
130
|
|
|
131
131
|
Usage:
|
|
132
132
|
|
|
133
133
|
```txt
|
|
134
|
-
|
|
134
|
+
ksc-prettier init
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
| Option | Description | Type | Default |
|
|
@@ -140,14 +140,14 @@ kpi-prettier init
|
|
|
140
140
|
| `--help`<br>`-h` | Show help | `boolean` | |
|
|
141
141
|
| `--version`<br>`-v` | Show version number | `boolean` | |
|
|
142
142
|
|
|
143
|
-
#### Subcommand: `
|
|
143
|
+
#### Subcommand: `ksc-prettier lint`
|
|
144
144
|
|
|
145
145
|
Check that files are formatted according to your Prettier configuration. Matches files below the current working directory by default.
|
|
146
146
|
|
|
147
147
|
Usage:
|
|
148
148
|
|
|
149
149
|
```txt
|
|
150
|
-
|
|
150
|
+
ksc-prettier lint [files..]
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
| Positional Argument | Description | Type | Default |
|
|
@@ -159,14 +159,14 @@ kpi-prettier lint [files..]
|
|
|
159
159
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
160
160
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
161
161
|
|
|
162
|
-
#### Subcommand: `
|
|
162
|
+
#### Subcommand: `ksc-prettier fix`
|
|
163
163
|
|
|
164
164
|
Format files according to your Prettier configuration. Matches files below the current working directory by default.
|
|
165
165
|
|
|
166
166
|
Usage:
|
|
167
167
|
|
|
168
168
|
```txt
|
|
169
|
-
|
|
169
|
+
ksc-prettier fix [files..]
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
| Positional Argument | Description | Type | Default |
|
|
@@ -178,14 +178,14 @@ kpi-prettier fix [files..]
|
|
|
178
178
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
179
179
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
180
180
|
|
|
181
|
-
#### Subcommand: `
|
|
181
|
+
#### Subcommand: `ksc-prettier print-config`
|
|
182
182
|
|
|
183
183
|
Print the effective Prettier configuration. Package-scoped.. Searches up to the root of a monorepo if necessary..
|
|
184
184
|
|
|
185
185
|
Usage:
|
|
186
186
|
|
|
187
187
|
```txt
|
|
188
|
-
|
|
188
|
+
ksc-prettier print-config
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
| Option | Description | Type |
|