@kitschpatrol/typescript-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 +8 -7
- package/readme.md +15 -15
- package/tsconfigs/base.json +1 -0
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
|
|
@@ -5819,7 +5819,7 @@ var commandDefinition = {
|
|
|
5819
5819
|
description: "Kitschpatrol's TypeScript shared configuration tools.",
|
|
5820
5820
|
logColor: "blueBright",
|
|
5821
5821
|
logPrefix: "[TypeScript Config]",
|
|
5822
|
-
name: "
|
|
5822
|
+
name: "ksc-typescript",
|
|
5823
5823
|
order: 3
|
|
5824
5824
|
};
|
|
5825
5825
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/typescript-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "TypeScript configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
7
7
|
"typescript",
|
|
8
8
|
"tsconfig",
|
|
9
9
|
"cli",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"ksc",
|
|
11
|
+
"ksc-typescript"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/kitschpatrol/shared-config/tree/main/packages/typescript-config",
|
|
14
14
|
"bugs": "https://github.com/kitschpatrol/shared-config/issues",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
".": "./tsconfigs/base.json"
|
|
29
29
|
},
|
|
30
30
|
"bin": {
|
|
31
|
-
"kpi-typescript": "bin/cli.js"
|
|
31
|
+
"kpi-typescript": "bin/cli.js",
|
|
32
|
+
"ksc-typescript": "bin/cli.js"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"tsconfigs/*",
|
|
@@ -41,14 +42,14 @@
|
|
|
41
42
|
"cosmiconfig-typescript-loader": "^6.1.0",
|
|
42
43
|
"execa": "^9.6.0",
|
|
43
44
|
"find-workspaces": "^0.3.1",
|
|
44
|
-
"fs-extra": "^11.3.
|
|
45
|
-
"prettier": "^3.
|
|
45
|
+
"fs-extra": "^11.3.1",
|
|
46
|
+
"prettier": "^3.6.2"
|
|
46
47
|
},
|
|
47
48
|
"peerDependencies": {
|
|
48
49
|
"typescript": "^5.8.3"
|
|
49
50
|
},
|
|
50
51
|
"engines": {
|
|
51
|
-
"node": ">=20.
|
|
52
|
+
"node": ">=20.19.0"
|
|
52
53
|
},
|
|
53
54
|
"publishConfig": {
|
|
54
55
|
"access": "public"
|
package/readme.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
24
|
-
It's a shared [TypeScript](https://www.typescriptlang.org/) `tsconfig.json` config, plus a command-line tool `
|
|
24
|
+
It's a shared [TypeScript](https://www.typescriptlang.org/) `tsconfig.json` config, plus a command-line tool `ksc-typescript` to perform TypeScript-related validation and linting.
|
|
25
25
|
|
|
26
26
|
<!-- recommendation -->
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ It's a shared [TypeScript](https://www.typescriptlang.org/) `tsconfig.json` conf
|
|
|
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
|
|
|
@@ -56,19 +56,19 @@ To use just this TypeScript config in isolation:
|
|
|
56
56
|
3. Add the starter `tsconfig.json` and `tsconfig.build.json` files to your project root, and add any customizations you'd like:
|
|
57
57
|
|
|
58
58
|
```sh
|
|
59
|
-
pnpm exec
|
|
59
|
+
pnpm exec ksc-typescript init
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Usage
|
|
63
63
|
|
|
64
|
-
You can call `
|
|
64
|
+
You can call `ksc-typescript` directly, or use the script bundled with the config.
|
|
65
65
|
|
|
66
66
|
Integrate with your `package.json` scripts as you see fit, for example:
|
|
67
67
|
|
|
68
68
|
```json
|
|
69
69
|
{
|
|
70
70
|
"scripts": {
|
|
71
|
-
"lint": "
|
|
71
|
+
"lint": "ksc-typescript lint"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
```
|
|
@@ -99,16 +99,16 @@ or
|
|
|
99
99
|
|
|
100
100
|
<!-- cli-help -->
|
|
101
101
|
|
|
102
|
-
#### Command: `
|
|
102
|
+
#### Command: `ksc-typescript`
|
|
103
103
|
|
|
104
104
|
Kitschpatrol's TypeScript shared configuration tools.
|
|
105
105
|
|
|
106
|
-
This section lists top-level commands for `
|
|
106
|
+
This section lists top-level commands for `ksc-typescript`.
|
|
107
107
|
|
|
108
108
|
Usage:
|
|
109
109
|
|
|
110
110
|
```txt
|
|
111
|
-
|
|
111
|
+
ksc-typescript <command>
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
| Command | Description |
|
|
@@ -124,14 +124,14 @@ kpi-typescript <command>
|
|
|
124
124
|
|
|
125
125
|
_See the sections below for more information on each subcommand._
|
|
126
126
|
|
|
127
|
-
#### Subcommand: `
|
|
127
|
+
#### Subcommand: `ksc-typescript init`
|
|
128
128
|
|
|
129
129
|
Initialize by copying starter config files to your project root.
|
|
130
130
|
|
|
131
131
|
Usage:
|
|
132
132
|
|
|
133
133
|
```txt
|
|
134
|
-
|
|
134
|
+
ksc-typescript init
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
| Option | Description | Type |
|
|
@@ -139,14 +139,14 @@ kpi-typescript init
|
|
|
139
139
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
140
140
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
141
141
|
|
|
142
|
-
#### Subcommand: `
|
|
142
|
+
#### Subcommand: `ksc-typescript lint`
|
|
143
143
|
|
|
144
144
|
Run type checking on your project. Package-scoped. In a monorepo, it will also run in all packages below the current working directory.
|
|
145
145
|
|
|
146
146
|
Usage:
|
|
147
147
|
|
|
148
148
|
```txt
|
|
149
|
-
|
|
149
|
+
ksc-typescript lint
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
| Option | Description | Type |
|
|
@@ -154,14 +154,14 @@ kpi-typescript lint
|
|
|
154
154
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
155
155
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
156
156
|
|
|
157
|
-
#### Subcommand: `
|
|
157
|
+
#### Subcommand: `ksc-typescript print-config`
|
|
158
158
|
|
|
159
159
|
Print the TypeScript configuration for the project. Package-scoped. Searches up to the root of a monorepo if necessary.
|
|
160
160
|
|
|
161
161
|
Usage:
|
|
162
162
|
|
|
163
163
|
```txt
|
|
164
|
-
|
|
164
|
+
ksc-typescript print-config
|
|
165
165
|
```
|
|
166
166
|
|
|
167
167
|
| Option | Description | Type |
|
|
@@ -175,7 +175,7 @@ kpi-typescript print-config
|
|
|
175
175
|
|
|
176
176
|
### Svelte caveat
|
|
177
177
|
|
|
178
|
-
The `
|
|
178
|
+
The `ksc-typescript lint` command will detect whether it's running in a Svelte project, and treat `lint` as a no-op when that's the case.
|
|
179
179
|
|
|
180
180
|
This is necessary to prevent unactionable warnings because Svelte [doesn't play well](https://github.com/sveltejs/language-tools/issues/2527) with the underlying TypeScript `tsc` command.
|
|
181
181
|
|