@teo-garcia/tsconfig-shared 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,71 @@
1
+ # @teo-garcia/tsconfig-shared
2
+
3
+ TypeScript configurations for modern development workflows.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install --save-dev @teo-garcia/tsconfig-shared
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Extend the appropriate configuration for your framework:
14
+
15
+ ### Next.js
16
+
17
+ ```json
18
+ {
19
+ "extends": "@teo-garcia/tsconfig-shared/next",
20
+ "compilerOptions": {
21
+ "paths": { "@/*": ["./app/*"] }
22
+ }
23
+ }
24
+ ```
25
+
26
+ ### React Router
27
+
28
+ ```json
29
+ {
30
+ "extends": "@teo-garcia/tsconfig-shared/react-router",
31
+ "compilerOptions": {
32
+ "baseUrl": ".",
33
+ "paths": { "@/*": ["./app/*"] }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ### Nest.js
39
+
40
+ ```json
41
+ {
42
+ "extends": "@teo-garcia/tsconfig-shared/nest",
43
+ "compilerOptions": {
44
+ "paths": { "@/*": ["./src/*"] }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### Vite + React
50
+
51
+ ```json
52
+ {
53
+ "extends": "@teo-garcia/tsconfig-shared/vite-react",
54
+ "compilerOptions": {
55
+ "baseUrl": ".",
56
+ "paths": { "@/*": ["./src/*"] }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## Available Configurations
62
+
63
+ - `base` - Common TypeScript settings
64
+ - `next` - Next.js optimized configuration
65
+ - `react-router` - React Router configuration
66
+ - `nest` - Nest.js server configuration
67
+ - `vite-react` - Vite + React configuration
68
+
69
+ ## License
70
+
71
+ MIT
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@teo-garcia/tsconfig-shared",
3
- "version": "0.1.0",
4
- "main": "tsconfig.json",
5
- "type": "commonjs"
3
+ "version": "0.1.2",
4
+ "description": "Shared TypeScript configurations for templates",
5
+ "main": "tsconfig.base.json",
6
+ "exports": {
7
+ "./base": "./tsconfig.base.json",
8
+ "./next": "./tsconfig.next.json",
9
+ "./react-router": "./tsconfig.react-router.json",
10
+ "./nest": "./tsconfig.nest.json",
11
+ "./vite-react": "./tsconfig.vite-react.json"
12
+ },
13
+ "files": [
14
+ "tsconfig.base.json",
15
+ "tsconfig.next.json",
16
+ "tsconfig.react-router.json",
17
+ "tsconfig.nest.json",
18
+ "tsconfig.vite-react.json"
19
+ ],
20
+ "keywords": [
21
+ "typescript",
22
+ "tsconfig",
23
+ "configuration",
24
+ "nextjs",
25
+ "react",
26
+ "nestjs",
27
+ "vite"
28
+ ],
29
+ "author": "Teo Garcia",
30
+ "license": "MIT",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/teo-garcia/templates"
34
+ }
6
35
  }
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "allowJs": true,
4
- "forceConsistentCasingInFileNames": true,
5
- "incremental": true,
6
- "isolatedModules": true,
7
- "noEmit": true,
8
- "resolveJsonModule": true,
9
3
  "skipLibCheck": true,
10
4
  "strict": true,
11
- "target": "ES2022",
12
- "module": "ES2022",
13
- "moduleResolution": "bundler",
14
- "lib": ["dom", "dom.iterable", "esnext"],
15
- "esModuleInterop": true
16
- }
5
+ "esModuleInterop": true,
6
+ "allowSyntheticDefaultImports": true,
7
+ "resolveJsonModule": true,
8
+ "isolatedModules": true,
9
+ "incremental": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "moduleDetection": "auto"
12
+ },
13
+ "exclude": ["node_modules"]
17
14
  }
@@ -0,0 +1,21 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "es2022",
5
+ "moduleResolution": "bundler",
6
+ "declaration": true,
7
+ "removeComments": true,
8
+ "emitDecoratorMetadata": true,
9
+ "experimentalDecorators": true,
10
+ "target": "ES2023",
11
+ "sourceMap": true,
12
+ "outDir": "./dist",
13
+ "baseUrl": "./",
14
+ "strictNullChecks": false,
15
+ "noImplicitAny": false,
16
+ "strictBindCallApply": false,
17
+ "forceConsistentCasingInFileNames": false,
18
+ "noFallthroughCasesInSwitch": false,
19
+ "types": ["jest", "node"]
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "target": "ES2017",
5
+ "lib": ["dom", "dom.iterable", "ES6"],
6
+ "allowJs": true,
7
+ "noEmit": true,
8
+ "module": "esnext",
9
+ "moduleResolution": "bundler",
10
+ "jsx": "preserve",
11
+ "plugins": [
12
+ {
13
+ "name": "next"
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "verbatimModuleSyntax": true,
8
+ "moduleResolution": "Bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "moduleDetection": "force",
11
+ "noEmit": true,
12
+ "jsx": "react-jsx",
13
+ "noUnusedLocals": true,
14
+ "noUnusedParameters": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "noUncheckedIndexedAccess": true,
17
+ "types": ["@types/node", "vite/client"]
18
+ }
19
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "allowImportingTsExtensions": true,
9
+ "noEmit": true,
10
+ "jsx": "react-jsx",
11
+ "noUnusedLocals": true,
12
+ "noUnusedParameters": true,
13
+ "noFallthroughCasesInSwitch": true,
14
+ "noUncheckedIndexedAccess": true,
15
+ "types": ["vite/client"]
16
+ }
17
+ }