https://github.com/supercharge/tsconfig
Shared TypeScript config for Supercharge projects
https://github.com/supercharge/tsconfig
config supercharge tsconfig typescript
Last synced: 6 months ago
JSON representation
Shared TypeScript config for Supercharge projects
- Host: GitHub
- URL: https://github.com/supercharge/tsconfig
- Owner: supercharge
- License: mit
- Created: 2020-04-14T02:53:36.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-04T03:53:36.000Z (over 1 year ago)
- Last Synced: 2025-04-22T01:03:54.043Z (6 months ago)
- Topics: config, supercharge, tsconfig, typescript
- Homepage:
- Size: 49.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Supercharge shareable TypeScript Config
Shared TypeScript config for Supercharge projects
Follow @marcuspoehls and @superchargejs for updates!
---
## Installation
```
npm i -D @supercharge/tsconfig
```## Targets
| Major Release | Node.js version | Module System |
| ------------- | --------------- | ------------ |
| `8.x` | `22.x` | ESM |
| `7.x` | `20.x` | ESM |
| `6.x` | `20.x` | CommonJS |
| `5.x` | `18.x` | CommonJS |
| `4.x` | `16.x` | CommonJS |
| `3.x` | `14.x` | CommonJS |
| `2.x` | `12.x` | CommonJS |
| `1.x` | `8.x` | CommonJS |## Usage
Create a `tsconfig.json` file in your project and extends the `@supercharge/tsconfig` [TypeScript config](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html):### Basic Usage
When installed, configure your `tsconfig.json` like this:```json
{
"extends": "@supercharge/tsconfig",
"compilerOptions": {
"outDir": "dist"
}
}
```### Refined Configuration
You can refine your `tsconfig.json` to your needs. Let’s say you want to target Node.js v16. Change your `compilerOptions` to this:```json
{
"extends": "@supercharge/tsconfig",
"display": "Node.js v16","compilerOptions": {
"outDir": "dist",
"target": "ES2021",
"lib": ["ES2021"]
}
}
```Customizing your `compilerOptions` when extending the `@supercharge/tsconfig` package only overrides the listed properties. Every other option defined in the base configuration will be inherited.
## Contributing
1. Create a fork
2. Create your feature branch: `git checkout -b my-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request 🚀## License
MIT © [Supercharge](https://superchargejs.com)---
> [superchargejs.com](https://superchargejs.com) ·
> GitHub [@supercharge](https://github.com/supercharge) ·
> Twitter [@superchargejs](https://twitter.com/superchargejs)