https://github.com/baltpeter/tsconfig
The TypeScript configs I use for my projects.
https://github.com/baltpeter/tsconfig
Last synced: 3 months ago
JSON representation
The TypeScript configs I use for my projects.
- Host: GitHub
- URL: https://github.com/baltpeter/tsconfig
- Owner: baltpeter
- License: cc0-1.0
- Created: 2023-01-06T23:09:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-05T15:12:22.000Z (about 3 years ago)
- Last Synced: 2025-03-15T04:26:26.453Z (over 1 year ago)
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @baltpeter/tsconfig
> The TypeScript configs I use for my projects.
This package contains the TypeScript configs I use for my projects. You probably don't want to use this unless you're working on a project with me.
## Usage
Install TypeScript and this config:
```sh
yarn add --dev typescript @baltpeter/tsconfig
```
Then, create a `tsconfig.json` file like this:
```json
{
"extends": "@baltpeter/tsconfig",
"include": ["src/**/*"]
}
```
Make sure to adapt the `include` property if necessary.
Instead of the default config, you can also use one of the following configs:
* `@baltpeter/tsconfig/tsconfig.node.json` for Node.js projects
* `@baltpeter/tsconfig/tsconfig.preact.json` for Preact projects
For the aliasing of React to Preact to work, you need to set `"baseUrl": "./"` in _your_ `tsconfig.json`, e.g.:
```json
{
"extends": "@baltpeter/tsconfig/tsconfig.preact.json",
"include": ["src/**/*"],
"compilerOptions": {
"baseUrl": "./"
}
}
```