-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement typescript configs V1.0
- Loading branch information
Showing
5 changed files
with
80 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<p align="center"><h1 align="center"> | ||
TypeScript Config | ||
</h1> | ||
|
||
<div align="center">OpenAlly TypeScript CJS & ESM configurations.</div> | ||
|
||
## Getting Started | ||
|
||
This package is available in the Node Package Repository and can be easily installed with [npm](https://docs.npmjs.com/getting-started/what-is-npm) or [yarn](https://yarnpkg.com). | ||
|
||
```bash | ||
$ npm i -D @openally/config.typescript | ||
# or | ||
$ yarn add @openally/config.typescript -D | ||
``` | ||
|
||
## Usage | ||
|
||
```json | ||
{ | ||
"extends": "@openally/config.typescript/cjs", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"rootDir": "./src" | ||
}, | ||
"include": ["src"], | ||
"exclude": ["node_modules", "dist"] | ||
} | ||
|
||
``` | ||
|
||
Use either **cjs** or **esm** | ||
|
||
```json | ||
{ | ||
"exports": { | ||
"./esm": "./src/esm/tsconfig.json", | ||
"./cjs": "./src/cjs/tsconfig.json" | ||
} | ||
} | ||
``` | ||
|
||
> [!NOTE] | ||
> The original inspiration for those configurations is [The TSConfig Cheat Sheet | ||
](https://www.totaltypescript.com/tsconfig-cheat-sheet) by Matt Pocock. | ||
|
||
|
||
## License | ||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Base Options: */ | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"target": "es2022", | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"moduleDetection": "force", | ||
"isolatedModules": true, | ||
"verbatimModuleSyntax": false, | ||
|
||
/* Strictness */ | ||
"strict": true, | ||
"noUncheckedIndexedAccess": false, | ||
"noImplicitOverride": true, | ||
|
||
/* Others */ | ||
"module": "CommonJS", | ||
"sourceMap": true, | ||
"declaration": true, | ||
"composite": false, | ||
"declarationMap": true, | ||
"lib": ["es2022"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,5 @@ | |
"composite": false, | ||
"declarationMap": true, | ||
"lib": ["es2022"] | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters