@abelspithost/tsconfig 0.0.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/README.md +55 -0
- package/package.json +14 -0
- package/tsconfig.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @abelspithost/tsconfig
|
|
2
|
+
|
|
3
|
+
Strict base TypeScript configuration that all other presets extend.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D @abelspithost/tsconfig typescript
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires `typescript` >= 5.0.0 as a peer dependency.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```jsonc
|
|
16
|
+
// tsconfig.json
|
|
17
|
+
{
|
|
18
|
+
"extends": "@abelspithost/tsconfig"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What's included
|
|
23
|
+
|
|
24
|
+
### Type Checking
|
|
25
|
+
|
|
26
|
+
- `strict` — enables all strict type-checking options
|
|
27
|
+
|
|
28
|
+
### Modules
|
|
29
|
+
|
|
30
|
+
- `esModuleInterop` — enables CommonJS/ESM interop
|
|
31
|
+
- `isolatedModules` — ensures each file can be independently transpiled
|
|
32
|
+
- `resolveJsonModule` — allows importing `.json` files
|
|
33
|
+
- `verbatimModuleSyntax` — enforces explicit `type` modifiers on type-only imports/exports
|
|
34
|
+
|
|
35
|
+
### Emit
|
|
36
|
+
|
|
37
|
+
- `declaration` — generates `.d.ts` declaration files
|
|
38
|
+
- `declarationMap` — generates declaration source maps for go-to-definition support
|
|
39
|
+
- `sourceMap` — generates `.js.map` source maps
|
|
40
|
+
- `outDir` — set to `${configDir}/dist`
|
|
41
|
+
|
|
42
|
+
### Interop Constraints
|
|
43
|
+
|
|
44
|
+
- `forceConsistentCasingInFileNames` — disallows inconsistently-cased references to the same file
|
|
45
|
+
- `skipLibCheck` — skips type checking of declaration files
|
|
46
|
+
|
|
47
|
+
### Paths
|
|
48
|
+
|
|
49
|
+
- `baseUrl` — set to `${configDir}`
|
|
50
|
+
- `@/*` — aliased to `./src/*`
|
|
51
|
+
|
|
52
|
+
### File Scope
|
|
53
|
+
|
|
54
|
+
- **include**: `${configDir}/**/*.ts`
|
|
55
|
+
- **exclude**: `${configDir}/dist`, `${configDir}/node_modules`
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@abelspithost/tsconfig",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Basic TypeScript configuration",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "Abel Spithost",
|
|
7
|
+
"exports": "./tsconfig.json",
|
|
8
|
+
"files": [
|
|
9
|
+
"tsconfig.json"
|
|
10
|
+
],
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"typescript": ">=5.0.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
/* Type Checking */
|
|
5
|
+
"strict": true,
|
|
6
|
+
|
|
7
|
+
/* Modules */
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"verbatimModuleSyntax": true,
|
|
12
|
+
|
|
13
|
+
/* Emit */
|
|
14
|
+
"declaration": true,
|
|
15
|
+
"declarationMap": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"outDir": "${configDir}/dist",
|
|
18
|
+
|
|
19
|
+
/* Interop Constraints */
|
|
20
|
+
"forceConsistentCasingInFileNames": true,
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
|
|
23
|
+
/* Paths & aliases */
|
|
24
|
+
"baseUrl": "${configDir}",
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": ["./src/*"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"exclude": ["${configDir}/dist", "${configDir}/node_modules"],
|
|
30
|
+
"include": ["${configDir}/**/*.ts"]
|
|
31
|
+
}
|