ts-reconf 0.4.1 → 0.4.3
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/LICENSE +21 -21
- package/README.md +84 -84
- package/package.json +49 -49
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 rockcoder
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rockcoder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
# ts-reconf
|
|
2
|
-
|
|
3
|
-
> Helps you better understand and simplify your `tsconfig.json` and tries to make it a bit less confusing
|
|
4
|
-
|
|
5
|
-
`ts-reconf` analyzes your TypeScript configuration and helps you:
|
|
6
|
-
- detect redundant, deprecated and default compiler options that could be removed
|
|
7
|
-
- understand what some setting actually does
|
|
8
|
-
- reduce complexity and confusion
|
|
9
|
-
- build a cleaner, more intentional config
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Why?
|
|
14
|
-
|
|
15
|
-
Most `tsconfig.json` files are:
|
|
16
|
-
- copied from somewhere
|
|
17
|
-
- accumulated over years
|
|
18
|
-
- full of redundant or outdated options
|
|
19
|
-
|
|
20
|
-
Developers often:
|
|
21
|
-
- don’t know what half the options do
|
|
22
|
-
- are afraid to remove anything
|
|
23
|
-
- end up with overly complex configs
|
|
24
|
-
|
|
25
|
-
**ts-reconf exists to fix that.**
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Installation & usage
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm install -g ts-reconf
|
|
33
|
-
ts-reconf analyze [./tsconfig.json]
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Run without installation
|
|
37
|
-
|
|
38
|
-
You can run `ts-reconf` instantly without installing it globally:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx ts-reconf analyze
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Run from the source
|
|
45
|
-
|
|
46
|
-
Clone the repository and run the CLI locally:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx tsx src/cli.ts analyze [./tsconfig.json]
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Example
|
|
55
|
-
|
|
56
|
-
### Input
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"compilerOptions": {
|
|
61
|
-
"strict": true,
|
|
62
|
-
"noImplicitAny": true,
|
|
63
|
-
"skipLibCheck": true,
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Output tsconfig findings:
|
|
69
|
-
|
|
70
|
-
#### Redundant
|
|
71
|
-
- `noImplicitAny` is redundant because `strict` already enables it
|
|
72
|
-
|
|
73
|
-
#### Explanation
|
|
74
|
-
- `skipLibCheck` skips type checking of declaration files (*.d.ts)
|
|
75
|
-
→ improves build speed but may hide type issues
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Contributing
|
|
81
|
-
|
|
82
|
-
Rules are small and easy to write. If you’ve ever thought:
|
|
83
|
-
“this tsconfig option is confusing or unnecessary”
|
|
84
|
-
— why not turn that into a rule .
|
|
1
|
+
# ts-reconf
|
|
2
|
+
|
|
3
|
+
> Helps you better understand and simplify your `tsconfig.json` and tries to make it a bit less confusing
|
|
4
|
+
|
|
5
|
+
`ts-reconf` analyzes your TypeScript configuration and helps you:
|
|
6
|
+
- detect redundant, deprecated and default compiler options that could be removed
|
|
7
|
+
- understand what some setting actually does
|
|
8
|
+
- reduce complexity and confusion
|
|
9
|
+
- build a cleaner, more intentional config
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why?
|
|
14
|
+
|
|
15
|
+
Most `tsconfig.json` files are:
|
|
16
|
+
- copied from somewhere
|
|
17
|
+
- accumulated over years
|
|
18
|
+
- full of redundant or outdated options
|
|
19
|
+
|
|
20
|
+
Developers often:
|
|
21
|
+
- don’t know what half the options do
|
|
22
|
+
- are afraid to remove anything
|
|
23
|
+
- end up with overly complex configs
|
|
24
|
+
|
|
25
|
+
**ts-reconf exists to fix that.**
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Installation & usage
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g ts-reconf
|
|
33
|
+
ts-reconf analyze [./tsconfig.json]
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Run without installation
|
|
37
|
+
|
|
38
|
+
You can run `ts-reconf` instantly without installing it globally:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx ts-reconf analyze
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Run from the source
|
|
45
|
+
|
|
46
|
+
Clone the repository and run the CLI locally:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx tsx src/cli.ts analyze [./tsconfig.json]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Example
|
|
55
|
+
|
|
56
|
+
### Input
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"compilerOptions": {
|
|
61
|
+
"strict": true,
|
|
62
|
+
"noImplicitAny": true,
|
|
63
|
+
"skipLibCheck": true,
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Output tsconfig findings:
|
|
69
|
+
|
|
70
|
+
#### Redundant
|
|
71
|
+
- `noImplicitAny` is redundant because `strict` already enables it
|
|
72
|
+
|
|
73
|
+
#### Explanation
|
|
74
|
+
- `skipLibCheck` skips type checking of declaration files (*.d.ts)
|
|
75
|
+
→ improves build speed but may hide type issues
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Contributing
|
|
81
|
+
|
|
82
|
+
Rules are small and easy to write. If you’ve ever thought:
|
|
83
|
+
“this tsconfig option is confusing or unnecessary”
|
|
84
|
+
— why not turn that into a rule .
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ts-reconf",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "Understand and simplify (re-conf) your tsconfig.json",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"ts-reconf": "
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"README.md",
|
|
13
|
-
"LICENSE"
|
|
14
|
-
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/rockcoder/ts-reconf.git"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsc",
|
|
21
|
-
"dev": "tsx src/cli.ts",
|
|
22
|
-
"clean": "rm -rf dist",
|
|
23
|
-
"start": "node dist/cli.js",
|
|
24
|
-
"test": "vitest",
|
|
25
|
-
"test:run": "vitest run",
|
|
26
|
-
"test:coverage": "vitest run --coverage",
|
|
27
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
28
|
-
},
|
|
29
|
-
"engines": {
|
|
30
|
-
"node": ">=20"
|
|
31
|
-
},
|
|
32
|
-
"keywords": [
|
|
33
|
-
"typescript",
|
|
34
|
-
"tsconfig",
|
|
35
|
-
"cli",
|
|
36
|
-
"developer-tools"
|
|
37
|
-
],
|
|
38
|
-
"author": "rockcoder",
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"dependencies": {
|
|
41
|
-
"typescript": "6.0.3"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@types/node": "
|
|
45
|
-
"@vitest/coverage-v8": "4.1.
|
|
46
|
-
"tsx": "4.
|
|
47
|
-
"vitest": "4.1.
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ts-reconf",
|
|
3
|
+
"version": "0.4.3",
|
|
4
|
+
"description": "Understand and simplify (re-conf) your tsconfig.json",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"ts-reconf": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/rockcoder/ts-reconf.git"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"dev": "tsx src/cli.ts",
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"start": "node dist/cli.js",
|
|
24
|
+
"test": "vitest",
|
|
25
|
+
"test:run": "vitest run",
|
|
26
|
+
"test:coverage": "vitest run --coverage",
|
|
27
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"typescript",
|
|
34
|
+
"tsconfig",
|
|
35
|
+
"cli",
|
|
36
|
+
"developer-tools"
|
|
37
|
+
],
|
|
38
|
+
"author": "rockcoder",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"typescript": "6.0.3"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "26.1.0",
|
|
45
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
46
|
+
"tsx": "4.23.0",
|
|
47
|
+
"vitest": "4.1.10"
|
|
48
|
+
}
|
|
49
|
+
}
|