Skip to content

Commit bee2cf3

Browse files
committed
✨ add typescript-configs
1 parent d764ce5 commit bee2cf3

File tree

7 files changed

+86
-5
lines changed

7 files changed

+86
-5
lines changed

package-lock.json

Lines changed: 9 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"eslint-config-typescript",
2929
"eslint-config-browser",
3030
"eslint-config-react"
31+
"typescript-configs"
3132
],
3233
"scripts": {
3334
"bump": "scripts/bump.sh",

typescript-configs/base.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"compilerOptions": {
3+
"module": "NodeNext",
4+
"moduleResolution": "NodeNext",
5+
6+
// input
7+
"skipLibCheck": false, // TODO: do we actually want false?
8+
"allowJs": true,
9+
"incremental": true,
10+
"forceConsistentCasingInFileNames": false,
11+
"resolveJsonModule": true,
12+
13+
// output
14+
"declaration": true,
15+
"emitDecoratorMetadata": true,
16+
"experimentalDecorators": true,
17+
"allowSyntheticDefaultImports": true,
18+
"target": "es2022",
19+
"sourceMap": true,
20+
"outDir": "./dist",
21+
22+
// config
23+
"baseUrl": "./",
24+
"noFallthroughCasesInSwitch": false,
25+
"esModuleInterop": true,
26+
// "verbatimModuleSyntax": true, // TODO: what is this?
27+
"moduleDetection": "force", // TODO: what is this?
28+
29+
// strictness
30+
"strict": true,
31+
"strictBindCallApply": true,
32+
"strictFunctionTypes": true,
33+
"strictNullChecks": true,
34+
// "strictPropertyInitialization": true,
35+
"useUnknownInCatchVariables": true,
36+
"noUncheckedIndexedAccess": true // TODO: can we actually do this?
37+
},
38+
"include": ["src/"],
39+
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
40+
}

typescript-configs/browser.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./base.json"
3+
}

typescript-configs/jest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./base.json"
3+
}

typescript-configs/node.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./base.json"
3+
}

typescript-configs/package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "@dudeofawesome/typescript-configs",
3+
"description": "My Typescript configs",
4+
"version": "1.3.0",
5+
"repository": {
6+
"type": "git",
7+
"url": "[email protected]:dudeofawesome/code-style.git",
8+
"directory": "/typescript-configs"
9+
},
10+
"keywords": [
11+
"typescript",
12+
"tsconfig"
13+
],
14+
"author": "Louis Orleans <[email protected]>",
15+
"license": "MIT",
16+
"main": "base.json",
17+
"scripts": {
18+
"test": "# node --require ts-node/register --test test/index.ts"
19+
},
20+
"peerDependencies": {
21+
"typescript": "^5.0.0, <5.2.0"
22+
},
23+
"devDependencies": {
24+
"@types/node": "^20.6.3",
25+
"ts-node": "^10.9.1"
26+
}
27+
}

0 commit comments

Comments
 (0)