Skip to content

Commit

Permalink
build: Add tsconfig.json and instructions for using it
Browse files Browse the repository at this point in the history
build: Add typescript peer dependencies
  • Loading branch information
marlonkeating committed Apr 11, 2023
1 parent 9dcada6 commit 373bbaf
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ npx install-peerdeps --dev @edx/typescript-config
```

This will install the package and all of its peer dependencies.

## Usage

Create file in repository `tsconfig.json`, adding references to the root directory, output directory, and directories to include/exclude in TypeScript compilation.

```json
{
"extends": "@edx/tsconfig",
"compilerOptions": {
"rootDir": ".",
"outDir": "dist"
},
"include": ["src/**/*"],
"exclude": ["dist"]
}
```
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@
"devDependencies": {
},
"peerDependencies": {
"@types/jest": "^26.0.0",
"ts-jest": "^26.5.0",
"typescript": "^4.9.4"
}
}
23 changes: 23 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"declaration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["dom", "es6", "dom.iterable"],
"isolatedModules": true,
"module": "ES6",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": false,
"noImplicitThis": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"strictFunctionTypes": false,
"target": "ES6",
},
}

0 comments on commit 373bbaf

Please sign in to comment.