Skip to content

Commit

Permalink
build: update tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
velut committed Jul 2, 2024
1 parent e397b4e commit 1c63407
Showing 1 changed file with 19 additions and 32 deletions.
51 changes: 19 additions & 32 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,25 @@
// See https://www.totaltypescript.com/tsconfig-cheat-sheet.
{
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"include": ["src", "types"],
"compilerOptions": {
"module": "esnext",
"lib": ["dom", "esnext"],
"importHelpers": true,
// output .d.ts declaration files for consumers
"declaration": true,
"declarationMap": true,
// output .js.map sourcemap files for consumers
"sourceMap": true,
// match output dir to input dir. e.g. dist/index instead of dist/src/index
"rootDir": "./src",
"declarationDir": "./dist",
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
// linter checks for common issues
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
// noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
"noUnusedLocals": true,
"noUnusedParameters": true,
"noUncheckedIndexedAccess": true,
// use Node's module resolution algorithm, instead of the legacy TS one
"moduleResolution": "node",
// transpile JSX to React.createElement
"jsx": "react",
// interop between ESM and CJS modules. Recommended by TS
// Base options.
"esModuleInterop": true,
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
"skipLibCheck": true,
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
// `dts build` ignores this option, but it is commonly used when type-checking separately with `tsc`
"noEmit": true
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,
// Strictness.
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Building a library.
"declaration": true,
// Transpiling with a bundler.
"module": "preserve",
"noEmit": true,
// No DOM.
"lib": ["es2022"]
}
}

0 comments on commit 1c63407

Please sign in to comment.