https://github.com/uvarovag/tsconfig-react
https://github.com/uvarovag/tsconfig-react
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uvarovag/tsconfig-react
- Owner: uvarovag
- Created: 2024-12-01T12:27:35.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-02-24T09:40:29.000Z (3 months ago)
- Last Synced: 2025-03-17T16:53:20.079Z (3 months ago)
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tsconfig-react
Shared TypeScript configuration for React projects using TypeScript.
## Installation
To use this configuration in your project, install the necessary dependencies:
```bash
npm install --save-dev @uvarovag/tsconfig-react typescript ts-node
```## Usage
### Step 1: Create a `tsconfig.json` file
```json
{
"extends": "@uvarovag/tsconfig-react",
// Files and folders to be included in the compilation process
"include": [
"src" // Only files in the "src" folder
],
// Files and folders to be excluded from the compilation process
"exclude": [
"node_modules", // Ignores the "node_modules" folder
"dist" // Ignores the "dist" folder (compiled code)
],
"compilerOptions": {
// Sets the base path for all relative paths
"baseUrl": "./",
// Configures path aliases for convenient module imports
"paths": {
"*": ["./src/*"] // All imports start from "src"
}
}
}
```### Step 2: Compile your project
```bash
npx tsc
```