@aristobyte-ui/typescript-config 1.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 ADDED
@@ -0,0 +1,67 @@
1
+ # @aristobyte/typescript-config
2
+
3
+ Centralized TypeScript configuration package for AristoByte monorepo.
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ This package consolidates shared TypeScript configurations to ensure consistent type safety, module resolution, and build standards across all AristoByte projects, including `apps/storybook`, `docs`, and UI packages.
10
+
11
+ Leveraging a base config (`tsconfig.base.json`), it provides extended presets for library builds and Next.js apps, streamlining developer experience and enforcing best practices at scale.
12
+
13
+ ---
14
+
15
+ ## Included Configurations
16
+
17
+ - **tsconfig.base.json**
18
+ Core compiler settings with strictness, module resolution (NodeNext), declaration output, and path aliases for seamless cross-package imports.
19
+
20
+ - **tsconfig.react.json**
21
+ Extends the base config, optimized for building React component libraries with JSX support and declaration-only emission.
22
+
23
+ - **tsconfig.next.json**
24
+ Tailored for Next.js projects, featuring JSX preservation, ESNext modules, bundler-aware resolution, and integration with Next.js plugins.
25
+
26
+ ---
27
+
28
+ ## Usage
29
+
30
+ In your project `tsconfig.json`, extend the relevant config depending on the context:
31
+
32
+ ```json
33
+ {
34
+ "extends": "@aristobyte/typescript-config/tsconfig.base.json"
35
+ }
36
+ ```
37
+
38
+ or
39
+
40
+ ```json
41
+ {
42
+ "extends": "@aristobyte/typescript-config/tsconfig.react.json"
43
+ }
44
+ ```
45
+
46
+ or
47
+
48
+ ```json
49
+ {
50
+ "extends": "@aristobyte/typescript-config/tsconfig.next.json"
51
+ }
52
+ ```
53
+
54
+ ## Benefits
55
+
56
+ - Enforces strict type safety and consistent compiler behavior.
57
+ - Simplifies path aliasing and module resolution across packages.
58
+ - Enhances incremental build performance and tooling compatibility.
59
+ - Aligns configurations for React libraries and Next.js apps out-of-the-box.
60
+
61
+ ## Contribution
62
+
63
+ Feel free to propose improvements or extensions to adapt to evolving codebase requirements.
64
+
65
+ ---
66
+
67
+ © AristoByte Inc. — Empowering scalable, maintainable TypeScript architectures.
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@aristobyte-ui/typescript-config",
3
+ "description": "Shared TypeScript config presets used across AristoByteUI platform and packages.",
4
+ "version": "1.0.0",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "main": "tsconfig.base.json",
8
+ "author": "AristoByte <info@aristobyte.com>",
9
+ "homepage": "https://github.com/aristobyte-team/aristobyte-ui.git#readme",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/aristobyte-team/aristobyte-ui.git",
13
+ "directory": "packages/typescript-config"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/aristobyte-team/aristobyte-ui.git/issues"
17
+ },
18
+ "engines": {
19
+ "node": ">=20.17.0",
20
+ "npm": ">=10.8.2",
21
+ "yarn": ">=1.22.22"
22
+ },
23
+ "keywords": [
24
+ "typescript",
25
+ "config",
26
+ "tsconfig",
27
+ "monorepo",
28
+ "aristobyte",
29
+ "aristobyte-ui"
30
+ ],
31
+ "exports": {
32
+ "./base": "./tsconfig.base.json",
33
+ "./react": "./tsconfig.react.json",
34
+ "./next": "./tsconfig.next.json",
35
+ "./package": "./tsconfig.package.json"
36
+ },
37
+ "files": [
38
+ "tsconfig.base.json",
39
+ "tsconfig.react.json",
40
+ "tsconfig.next.json",
41
+ "tsconfig.package.json"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public"
45
+ }
46
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2022",
5
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
6
+ "module": "NodeNext",
7
+ "moduleResolution": "NodeNext",
8
+ "moduleDetection": "force",
9
+
10
+ // Output
11
+ "declaration": true,
12
+ "declarationMap": true,
13
+ "emitDeclarationOnly": false,
14
+ "outDir": "dist",
15
+
16
+ // Interop & Tools
17
+ "esModuleInterop": true,
18
+ "resolveJsonModule": true,
19
+ "allowSyntheticDefaultImports": true,
20
+ "isolatedModules": true,
21
+ "incremental": true,
22
+
23
+ // Strictness
24
+ "strict": true,
25
+ "noUncheckedIndexedAccess": true,
26
+ "skipLibCheck": true,
27
+
28
+ // Paths
29
+ "baseUrl": ".",
30
+ "paths": {
31
+ "@aristobyte/ui/*": ["packages/ui/src/*"],
32
+ "@types/*": ["@types/*"]
33
+ },
34
+
35
+ "types": ["node"],
36
+ "typeRoots": ["./@types", "./node_modules/@types"],
37
+ "forceConsistentCasingInFileNames": true
38
+ },
39
+ "include": ["@types", "packages", "apps"],
40
+ "exclude": ["node_modules", "dist", "build"]
41
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./tsconfig.base.json",
4
+ "compilerOptions": {
5
+ "jsx": "preserve",
6
+ "module": "ESNext",
7
+ "moduleResolution": "Bundler",
8
+ "noEmit": true,
9
+ "allowJs": true,
10
+ "plugins": [{ "name": "next" }]
11
+ },
12
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
13
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./tsconfig.base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx",
6
+ "noEmit": false,
7
+ "emitDeclarationOnly": true,
8
+ "declaration": true,
9
+ "module": "ESNext",
10
+ "target": "ES6",
11
+ "moduleResolution": "node"
12
+ },
13
+ "include": ["src"]
14
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "extends": "./tsconfig.base.json",
4
+ "compilerOptions": {
5
+ "jsx": "react-jsx",
6
+ "noEmit": false,
7
+ "emitDeclarationOnly": true
8
+ },
9
+ "include": ["src"]
10
+ }