Skip to content

Commit d649f9e

Browse files
committed
Add tsconfig and readme
1 parent 6e6af5f commit d649f9e

File tree

4 files changed

+66
-1
lines changed

4 files changed

+66
-1
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*]
2+
indent_size = 2

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
1-
# tsconfig
1+
# @devsht/tsconfig
2+
23
Reusable TS config
4+
5+
## Installation
6+
7+
```bash
8+
npm i -D @devsht/tsconfig
9+
```
10+
11+
or
12+
13+
```
14+
yarn add --dev @devsht/tsconfig
15+
```
16+
17+
## Usage
18+
19+
Create a **tsconfig.json** and add this package to the extends field.
20+
21+
```
22+
{
23+
"extends": "@devsht/tsconfig",
24+
"compilerOptions": {
25+
"outDir": "dist"
26+
},
27+
"include": ["src"]
28+
}
29+
```

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "@devsht/tsconfig",
3+
"version": "0.0.0",
4+
"description": "Reusable TS config",
5+
"main": "tsconfig.json",
6+
"repository": "[email protected]:devsht/tsconfig.git",
7+
"author": "Michael Mason <[email protected]>"
8+
}

tsconfig.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"compilerOptions": {
3+
"allowUnreachableCode": false,
4+
"alwaysStrict": true,
5+
"declaration": true,
6+
"declarationMap": true,
7+
"emitDeclarationOnly": true,
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"importsNotUsedAsValues": "preserve",
11+
"isolatedModules": true,
12+
"jsx": "react-jsx",
13+
"lib": ["ES2020"],
14+
"module": "commonjs",
15+
"noEmitOnError": true,
16+
"noErrorTruncation": true,
17+
"noImplicitReturns": true,
18+
"noUncheckedIndexedAccess": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"removeComments": true,
22+
"resolveJsonModule": true,
23+
"skipLibCheck": true,
24+
"sourceMap": true,
25+
"strict": true,
26+
"target": "ES2020"
27+
}
28+
}

0 commit comments

Comments
 (0)