chore: prepare first release 1.0.1
This commit is contained in:
@@ -1,21 +1,47 @@
|
||||
# @mintel/tsconfig
|
||||
|
||||
Shared TypeScript configurations for Mintel projects.
|
||||
Centralized TypeScript configurations for all Mintel projects, ensuring consistent compiler settings and modern target environments.
|
||||
|
||||
## Usage
|
||||
## 📦 Configurations
|
||||
|
||||
### Base Configuration
|
||||
In your `tsconfig.json`:
|
||||
### `base.json`
|
||||
The foundation for all TypeScript projects in the monorepo.
|
||||
- **Target**: `ES2020`
|
||||
- **Module Resolution**: `bundler`
|
||||
- **Strictness**: `strict: false` (aligned with `klz-2026` standards)
|
||||
- **Features**: Enables `esModuleInterop`, `resolveJsonModule`, and `isolatedModules`.
|
||||
|
||||
### `nextjs.json`
|
||||
Extends `base.json` with specific settings for Next.js applications.
|
||||
- **Plugins**: Includes the `next` TypeScript plugin for enhanced IDE support.
|
||||
- **JSX**: Set to `preserve`.
|
||||
|
||||
## 🚀 Usage
|
||||
|
||||
### In a Next.js App
|
||||
Create a `tsconfig.json` in your project root:
|
||||
```json
|
||||
{
|
||||
"extends": "@mintel/tsconfig/base.json"
|
||||
"extends": "@mintel/tsconfig/nextjs.json",
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
```
|
||||
|
||||
### Next.js Configuration
|
||||
In your `tsconfig.json`:
|
||||
### In a Library Package
|
||||
Create a `tsconfig.json` in your package root:
|
||||
```json
|
||||
{
|
||||
"extends": "@mintel/tsconfig/nextjs.json"
|
||||
"extends": "@mintel/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user