Skip to content

teneplaysofficial/tsconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tenedev/tsconfig

Shared TypeScript configuration

npm version Downloads

Install

npm i -D @tenedev/tsconfig

Requires TypeScript ^6

Usage

Extend it in your tsconfig.json:

{
  "extends": "@tenedev/tsconfig",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist",
  },
  "include": ["src"],
}

What's included

Environment

Option Value Description
target esnext Compile to latest JS syntax
module esnext Emits native ES module syntax without transforming imports/exports
moduleResolution bundler Uses bundler-style resolution, bypassing Node ESM extension requirements and supporting flexible import paths
lib ESNext, DOM, DOM.Iterable, DOM.AsyncIterable Full browser + modern JS type definitions

Strict & Safety

Option Description
strict Enables all strict checks
alwaysStrict Emits "use strict" in every file
noImplicitAny Error when TS infers any
noImplicitOverride Must use override keyword in class methods
noImplicitReturns All code paths must return
noFallthroughCasesInSwitch No accidental switch fallthrough
noUnusedLocals Error on unused variables
noUnusedParameters Error on unused function params
noUncheckedIndexedAccess Index access returns T | undefined
noPropertyAccessFromIndexSignature Must use bracket notation for index types
exactOptionalPropertyTypes Optional props can't be explicitly undefined
useUnknownInCatchVariables Catch variables are unknown not any
allowUnreachableCode Error on unreachable code
allowUnusedLabels Error on unused labels
noErrorTruncation Full type printed in error messages

Interop

Option Description
verbatimModuleSyntax Enforces import type at syntax level
esModuleInterop Default imports from CJS modules
allowSyntheticDefaultImports import x from 'y' without default export
allowJs Allows .js files in project
allowImportingTsExtensions Import .ts files with extension
importHelpers Uses tslib instead of inlining helpers
resolveJsonModule Import .json files
isolatedModules Each file transpilable independently
forceConsistentCasingInFileNames Error on casing mismatches in imports
skipLibCheck Skip type checking of node_modules .d.ts files

Output

Option Description
declaration Generates .d.ts files
declarationMap Generates .d.ts.map source maps
sourceMap Generates .js.map source maps
noEmit No file output - use your bundler

About

🪄 Shared TypeScript configuration

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors