Shared TypeScript config presets used across AristoByteUI platform and packages.
npm install @aristobyte-ui/typescript-config@aristobyte-ui/typescript-config
Centralized TypeScript configuration presets for the AristoByte UI ecosystem.
Opinionated, consistent, and production-ready.
@aristobyte-ui/typescript-config provides shared TypeScript configurations that enforce strict standards across all AristoByte UI packages.
This ensures:
- ๐ Consistency across the monorepo ecosystem.
- โก Developer Velocity by removing redundant boilerplate.
- ๐ฆ Scalability with unified upgrades and evolving presets.
- ๐งน Clean output with correct declaration mapping for distributable packages.
``bashInstall via Yarn
yarn add -D @aristobyte-ui/typescript-config
๐ Usage
In your
tsconfig.json, extend one of the provided presets.Base configuration (for libraries):
`json
{
"extends": "@aristobyte-ui/typescript-config/base",
"compilerOptions": {
"outDir": "dist",
"declarationDir": "dist/types"
},
"include": ["src", "index.ts"]
}
`React packages:
`json
{
"extends": "@aristobyte-ui/typescript-config/react",
"include": ["components", "index.ts"],
"exclude": ["dist", "node_modules"]
}
`Next.js projects:
`json
{
"extends": "@aristobyte-ui/typescript-config/next",
"include": ["app", "pages", "components"],
"exclude": ["dist", "node_modules"]
}
`Package-ready builds (library publishing):
`json
{
"extends": "@aristobyte-ui/typescript-config/package",
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
`Node.js tools / CLI projects:
`json
{
"extends": "@aristobyte-ui/typescript-config/node",
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
`Library preset (bundler-first projects):
`json
{
"extends": "@aristobyte-ui/typescript-config/library",
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
`Node.js tools / CLI projects:
`json
{
"extends": "@aristobyte-ui/typescript-config/node",
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
`Library preset (bundler-first projects):
`json
{
"extends": "@aristobyte-ui/typescript-config/library",
"include": ["src"],
"exclude": ["dist", "node_modules"]
}
`๐ Presets Available
-
base โ Strict, modern TypeScript defaults for libraries.
- react โ Extends base with React + JSX optimizations.
- next โ Opinionated config optimized for Next.js projects.
- package โ Publishing-friendly output with declarations and ESNext module resolution.
- node โ Node.js-first config with NodeNext resolution and types.
- library โ Bundler-first preset with modern lib targets.
- node โ Node.js-first config with NodeNext module resolution.
- library โ Bundler-first config with modern libs and declarations.๐ง Example in a Package
package.json:`json
{
"name": "@aristobyte-ui/button",
"version": "1.0.0",
"scripts": {
"build": "tsup"
},
"devDependencies": {
"@aristobyte-ui/typescript-config": "2.0.0",
"typescript": "^5.8.3"
}
}
`tsconfig.json:`json
{
"extends": "@aristobyte-ui/typescript-config/react",
"include": ["components", "index.ts"]
}
`๐ Why This Matters
| Feature | Benefit |
| -------------------------------- | ------------------------------------- |
|
strict: true | Eliminates runtime edge cases early |
| noUncheckedIndexedAccess: true | Safer array/object access |
| declaration: true | Ensures correct .d.ts output |
| jsx: react-jsx | Optimized for React 17+ and beyond |
| incremental | Faster rebuilds in monorepo workflows |
| moduleResolution: NodeNext` | Modern interoperability for ESM/CJS |At AristoByte UI, we believe configuration should empower, not obstruct.
This package encapsulates our best practices into ready-to-consume presets that evolve alongside the ecosystem.
MIT ยฉ AristoByte