https://github.com/vllnt/typescript
Shared TypeScript configurations for vllnt projects
https://github.com/vllnt/typescript
nextjs nodejs react shared-config tsconfig typescript
Last synced: 2 months ago
JSON representation
Shared TypeScript configurations for vllnt projects
- Host: GitHub
- URL: https://github.com/vllnt/typescript
- Owner: vllnt
- License: mit
- Created: 2026-02-09T17:34:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-05T16:32:40.000Z (3 months ago)
- Last Synced: 2026-03-05T19:31:52.168Z (3 months ago)
- Topics: nextjs, nodejs, react, shared-config, tsconfig, typescript
- Homepage: https://www.npmjs.com/package/@vllnt/typescript
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @vllnt/typescript
Shared TypeScript configurations for vllnt projects. Strict, modern, Node 22+.
## Install
```sh
npm install -D @vllnt/typescript
```
## Presets
| Preset | Use case | Module | Target |
|--------|----------|--------|--------|
| `base.json` | Foundation (extended by others) | - | - |
| `nodejs.json` | Node.js applications | NodeNext | ES2024 |
| `node-library.json` | Publishable npm packages | NodeNext | ES2024 |
| `react.json` | React apps (Vite, CRA, etc.) | ESNext | ES2022 |
| `nextjs.json` | Next.js applications | ESNext | ES2022 |
## Usage
Extend a preset in your `tsconfig.json`:
### Node.js application
```json
{
"extends": "@vllnt/typescript/nodejs.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}
```
### Node library (npm package)
```json
{
"extends": "@vllnt/typescript/node-library.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}
```
### React
```json
{
"extends": "@vllnt/typescript/react.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}
```
### Next.js
```json
{
"extends": "@vllnt/typescript/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
```
## What's included
All presets extend `base.json` which enforces:
- `strict: true`
- `isolatedModules: true`
- `noUncheckedIndexedAccess: true`
- `skipLibCheck: true`
- `esModuleInterop: true`
- `resolveJsonModule: true`
## Requirements
- Node.js >= 22
- TypeScript >= 5.0
## License
MIT