-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tsconfig-base): new package for TypeScript base config
- Loading branch information
Showing
3 changed files
with
132 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Alwatr TypeScript Config | ||
|
||
This is a base TypeScript configuration for Alwatr projects. | ||
|
||
## Usage | ||
|
||
Install the package: | ||
|
||
```bash | ||
yarn add -D @alwatr/tsconfig-base | ||
``` | ||
|
||
Create a `tsconfig.json` file in the root of your project: | ||
|
||
```json | ||
{ | ||
"extends": "@alwatr/tsconfig-base", | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"outDir": "." | ||
}, | ||
"include": ["src/**/*.ts"], | ||
} | ||
``` |
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,31 @@ | ||
{ | ||
"name": "@alwatr/tsconfig-base", | ||
"version": "1.0.0", | ||
"description": "This is a base TypeScript configuration for Alwatr projects.", | ||
"keywords": [ | ||
"typescript", | ||
"tsconfig", | ||
"tsconfig.json", | ||
"tsconfig-base", | ||
"esm", | ||
"alwatr" | ||
], | ||
"author": "S. Ali Mihandoost <[email protected]>", | ||
"license": "MIT", | ||
"files": [ | ||
"tsconfig.json", | ||
"**/*.{d.ts.map,d.ts,js.map,js,html,md}" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Alwatr/nanolib", | ||
"directory": "packages/tsconfig-base" | ||
}, | ||
"homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/tsconfig-base#readme", | ||
"bugs": { | ||
"url": "https://github.com/Alwatr/nanolib/issues" | ||
} | ||
} |
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,77 @@ | ||
{ | ||
// https://www.typescriptlang.org/tsconfig | ||
"compilerOptions": { | ||
/* Basic Options */ | ||
"incremental": true, | ||
"target": "ES2020", | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"lib": ["ES2023"], | ||
// "allowJs": true, | ||
// "checkJs": true, | ||
// "jsx": "preserve", | ||
"declaration": true, | ||
// "outFile": "./", | ||
"outDir": "./", | ||
// "rootDir": "./src", | ||
"composite": true, | ||
"tsBuildInfoFile": ".tsbuildinfo", | ||
// "removeComments": true, | ||
// "noEmit": true, | ||
// "emitDeclarationOnly": true, | ||
// "importHelpers": true, | ||
// "noEmitHelpers": true, | ||
// "downlevelIteration": true, | ||
"isolatedModules": true, // need for esbuild | ||
|
||
/* Strict Type-Checking Options */ | ||
"strict": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"strictFunctionTypes": true, | ||
"strictBindCallApply": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
|
||
/* Additional Checks */ | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitOverride": true, | ||
// "noUncheckedIndexedAccess": true, | ||
// "noPropertyAccessFromIndexSignature": true, | ||
|
||
/* Module Resolution Options */ | ||
// "paths": {}, | ||
// "rootDirs": [], | ||
// "typeRoots": [], | ||
// "types": [], | ||
"allowSyntheticDefaultImports": true, | ||
// "esModuleInterop": true, | ||
// "preserveSymlinks": true, | ||
// "allowUmdGlobalAccess": true, | ||
|
||
/* Source Map Options */ | ||
"sourceMap": true, | ||
"declarationMap": true, | ||
// "sourceRoot": "", | ||
// "mapRoot": "", | ||
// "inlineSourceMap": true, | ||
"inlineSources": true, | ||
|
||
/* Experimental Options */ | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
|
||
/* Advanced Options */ | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"useDefineForClassFields": true, | ||
// "resolveJsonModule": true, // temporary for fix import json issue | ||
|
||
"listEmittedFiles": true, | ||
// "diagnostics": true, | ||
}, | ||
} |