@carbonid1/tsconfig 0.1.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 ADDED
@@ -0,0 +1,34 @@
1
+ # @carbonid1/tsconfig
2
+
3
+ Shared TypeScript configurations.
4
+
5
+ ## Usage
6
+
7
+ Install:
8
+
9
+ ```sh
10
+ pnpm add -D @carbonid1/tsconfig
11
+ ```
12
+
13
+ Extend in your `tsconfig.json`:
14
+
15
+ ```json
16
+ {
17
+ "extends": "@carbonid1/tsconfig/nextjs.json",
18
+ "compilerOptions": {
19
+ "paths": { "@/*": ["./src/*"] }
20
+ },
21
+ "include": ["**/*.ts", "**/*.tsx"]
22
+ }
23
+ ```
24
+
25
+ ## Available configs
26
+
27
+ | Config | Use for |
28
+ | --- | --- |
29
+ | `base.json` | Strict defaults only; no framework assumptions |
30
+ | `nextjs.json` | Next.js apps (JSX preserve, Next plugin, `noEmit`) |
31
+ | `react-library.json` | React libraries (emits `.d.ts` with maps) |
32
+ | `electron.json` | Electron main/preload processes (CommonJS, Node resolution) |
33
+
34
+ Each config extends `base.json`. Add project-specific options (paths, includes, excludes) in your own `tsconfig.json`.
package/base.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Base",
4
+ "compilerOptions": {
5
+ "target": "ES2017",
6
+ "lib": ["dom", "dom.iterable", "esnext"],
7
+ "module": "esnext",
8
+ "moduleResolution": "bundler",
9
+ "strict": true,
10
+ "noUnusedLocals": true,
11
+ "noUnusedParameters": true,
12
+ "noUncheckedIndexedAccess": true,
13
+ "isolatedModules": true,
14
+ "esModuleInterop": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "skipLibCheck": true,
17
+ "resolveJsonModule": true,
18
+ "incremental": true
19
+ }
20
+ }
package/electron.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Electron",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "target": "ES2022",
7
+ "module": "CommonJS",
8
+ "moduleResolution": "node",
9
+ "sourceMap": true
10
+ }
11
+ }
package/nextjs.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "Next.js",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "jsx": "react-jsx",
7
+ "allowJs": true,
8
+ "noEmit": true,
9
+ "plugins": [{ "name": "next" }]
10
+ }
11
+ }
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@carbonid1/tsconfig",
3
+ "version": "0.1.0",
4
+ "description": "Shared TypeScript configurations",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/carbonid1/packages",
8
+ "directory": "packages/tsconfig"
9
+ },
10
+ "license": "MIT",
11
+ "author": "Andrew Korin",
12
+ "files": [
13
+ "*.json"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "display": "React Library",
4
+ "extends": "./base.json",
5
+ "compilerOptions": {
6
+ "jsx": "react-jsx",
7
+ "declaration": true,
8
+ "declarationMap": true
9
+ }
10
+ }