@djangocfg/typescript-config 1.4.17 → 1.4.19
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 +75 -21
- package/package.json +22 -2
package/README.md
CHANGED
|
@@ -1,58 +1,112 @@
|
|
|
1
1
|
# @djangocfg/typescript-config
|
|
2
2
|
|
|
3
|
-
Shared TypeScript
|
|
3
|
+
> Shared TypeScript configurations for Next.js, React libraries, and Node.js projects with strict type checking
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@djangocfg/typescript-config)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
**Part of [DjangoCFG](https://djangocfg.com)** — a modern Django framework for building production-ready SaaS applications. All `@djangocfg/*` packages are designed to work together, providing type-safe configuration, real-time features, and beautiful admin interfaces out of the box.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
`@djangocfg/typescript-config` provides battle-tested TypeScript configurations for modern web development. It includes presets for Next.js applications, React component libraries, and general TypeScript projects.
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **Strict Mode** - Maximum type safety with strict compiler options
|
|
19
|
+
- **Next.js Preset** - Optimized for Next.js App Router
|
|
20
|
+
- **React Library Preset** - Configured for publishing React packages
|
|
21
|
+
- **Path Aliases** - Standard path mapping configuration
|
|
22
|
+
- **Modern Target** - ES2022 output for modern runtimes
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -D @djangocfg/typescript-config
|
|
28
|
+
# or
|
|
29
|
+
pnpm add -D @djangocfg/typescript-config
|
|
30
|
+
# or
|
|
31
|
+
yarn add -D @djangocfg/typescript-config
|
|
32
|
+
```
|
|
10
33
|
|
|
11
34
|
## Usage
|
|
12
35
|
|
|
13
|
-
### Next.js
|
|
36
|
+
### Next.js Application
|
|
14
37
|
|
|
15
38
|
```json
|
|
16
39
|
{
|
|
17
40
|
"extends": "@djangocfg/typescript-config/nextjs.json",
|
|
41
|
+
"compilerOptions": {
|
|
42
|
+
"baseUrl": ".",
|
|
43
|
+
"paths": {
|
|
44
|
+
"@/*": ["./src/*"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
18
47
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
19
48
|
"exclude": ["node_modules"]
|
|
20
49
|
}
|
|
21
50
|
```
|
|
22
51
|
|
|
23
|
-
### React Library
|
|
52
|
+
### React Library
|
|
24
53
|
|
|
25
54
|
```json
|
|
26
55
|
{
|
|
27
56
|
"extends": "@djangocfg/typescript-config/react-library.json",
|
|
57
|
+
"compilerOptions": {
|
|
58
|
+
"outDir": "dist",
|
|
59
|
+
"rootDir": "src"
|
|
60
|
+
},
|
|
28
61
|
"include": ["src/**/*"],
|
|
29
62
|
"exclude": ["node_modules", "dist"]
|
|
30
63
|
}
|
|
31
64
|
```
|
|
32
65
|
|
|
33
|
-
### Base
|
|
66
|
+
### Base Configuration
|
|
34
67
|
|
|
35
68
|
```json
|
|
36
69
|
{
|
|
37
70
|
"extends": "@djangocfg/typescript-config/base.json",
|
|
38
71
|
"compilerOptions": {
|
|
39
|
-
|
|
72
|
+
"outDir": "dist"
|
|
40
73
|
}
|
|
41
74
|
}
|
|
42
75
|
```
|
|
43
76
|
|
|
44
|
-
##
|
|
77
|
+
## Available Configs
|
|
78
|
+
|
|
79
|
+
| Config | Description |
|
|
80
|
+
|--------|-------------|
|
|
81
|
+
| `base.json` | Base strict TypeScript configuration |
|
|
82
|
+
| `nextjs.json` | Next.js App Router configuration |
|
|
83
|
+
| `react-library.json` | React component library configuration |
|
|
84
|
+
|
|
85
|
+
## Compiler Options
|
|
86
|
+
|
|
87
|
+
All configurations include these strict options:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"strict": true,
|
|
92
|
+
"esModuleInterop": true,
|
|
93
|
+
"skipLibCheck": true,
|
|
94
|
+
"resolveJsonModule": true,
|
|
95
|
+
"isolatedModules": true,
|
|
96
|
+
"noUncheckedIndexedAccess": true,
|
|
97
|
+
"noImplicitOverride": true,
|
|
98
|
+
"forceConsistentCasingInFileNames": true
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Documentation
|
|
103
|
+
|
|
104
|
+
Full documentation available at [djangocfg.com](https://djangocfg.com)
|
|
105
|
+
|
|
106
|
+
## Contributing
|
|
45
107
|
|
|
46
|
-
|
|
47
|
-
- **Path Aliases** - Configured for monorepo
|
|
48
|
-
- **Module Resolution** - ESNext with bundler resolution
|
|
49
|
-
- **JSX Support** - React 19 compatible
|
|
108
|
+
Issues and pull requests are welcome at [GitHub](https://github.com/markolofsen/django-cfg)
|
|
50
109
|
|
|
51
|
-
##
|
|
110
|
+
## License
|
|
52
111
|
|
|
53
|
-
|
|
54
|
-
- `strict: true`
|
|
55
|
-
- `esModuleInterop: true`
|
|
56
|
-
- `skipLibCheck: true`
|
|
57
|
-
- `resolveJsonModule: true`
|
|
58
|
-
- `isolatedModules: true`
|
|
112
|
+
MIT - see [LICENSE](./LICENSE) for details
|
package/package.json
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/typescript-config",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.19",
|
|
4
|
+
"description": "Shared TypeScript configurations for Next.js, React libraries, and Node.js projects with strict type checking",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"tsconfig",
|
|
8
|
+
"configuration",
|
|
9
|
+
"nextjs",
|
|
10
|
+
"react",
|
|
11
|
+
"node",
|
|
12
|
+
"strict",
|
|
13
|
+
"django",
|
|
14
|
+
"shared-config"
|
|
15
|
+
],
|
|
4
16
|
"author": {
|
|
5
17
|
"name": "DjangoCFG",
|
|
6
18
|
"url": "https://djangocfg.com"
|
|
7
19
|
},
|
|
20
|
+
"homepage": "https://djangocfg.com",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/markolofsen/django-cfg.git",
|
|
24
|
+
"directory": "packages/typescript-config"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/markolofsen/django-cfg/issues"
|
|
28
|
+
},
|
|
8
29
|
"license": "MIT",
|
|
9
|
-
"description": "Shared TypeScript configurations for Unrealon projects",
|
|
10
30
|
"main": "base.json",
|
|
11
31
|
"exports": {
|
|
12
32
|
"./base.json": "./base.json",
|