🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@dvashim/typescript-config

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dvashim/typescript-config

Shared TypeScript configurations

latest
Source
npmnpm
Version
4.0.3
Version published
Weekly downloads
141
-32.54%
Maintainers
2
Weekly downloads
 
Created
Source

TypeScript Configurations

CI npm version npm downloads License: MIT TypeScript Checked with Biome Socket

Shareable tsconfig.json presets for libraries, React applications, and Node.js tooling — strict ES2025 + ESM defaults with bundler module resolution.

Contents

Requirements

Installation

npm:

npm install -D @dvashim/typescript-config

or pnpm:

pnpm add -D @dvashim/typescript-config

Configurations

NamePath
Base@dvashim/typescript-config
Library development@dvashim/typescript-config/lib-dev
Library production@dvashim/typescript-config/lib-prod
React JSX application@dvashim/typescript-config/app-react
Vite + React JSX application@dvashim/typescript-config/app-react-vite
Node@dvashim/typescript-config/node

Usage

Base configuration:

// tsconfig.json (base)
// ---
// Strict ES2025 + ESM foundation with bundler resolution.
// Enforces verbatim module syntax, erasable-only syntax,
// and maximum type safety (strict, exactOptionalPropertyTypes,
// noUncheckedIndexedAccess, noUnusedLocals, etc.).

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config",
  "include": ["src"]
}

Library development configuration:

// tsconfig.json (library development)
// ---
// Extends base for library development.
// Enables .d.ts declarations, composite builds,
// source maps, declaration maps, isolated declarations,
// and .ts/.tsx → .js/.jsx import rewriting on emit.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config/lib-dev",
  "include": ["src"]
}

Library production configuration:

// tsconfig.json (library production)
// ---
// Extends lib-dev for production builds.
// Strips source maps, declaration maps, comments,
// and @internal declarations for minimal output.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config/lib-prod",
  "include": ["src"]
}

React JSX application configuration:

// tsconfig.json (react jsx application)
// ---
// Extends base for React applications.
// Adds DOM + DOM.Iterable + DOM.AsyncIterable libs,
// automatic JSX runtime, and .ts/.tsx extension imports.
// No emit — bundler handles output.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config/app-react",
  "include": ["src"]
}

Vite + React JSX application configuration:

// tsconfig.json (vite + react jsx application)
// ---
// Extends React config with Vite client types
// (import.meta.env, import.meta.hot, asset imports).

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config/app-react-vite",
  "include": ["src"]
}

Node configuration:

// tsconfig.json (node)
// ---
// Extends base for Node.js tooling files
// (build configs, scripts). @types/node
// and .ts extension imports.
// No emit — bundler handles output.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "extends": "@dvashim/typescript-config/node",
  "include": ["vite.config.ts"]
}

Options

Base

Options listed below are set explicitly. Additional options (strict, module: "esnext", moduleResolution: "bundler", noUncheckedSideEffectImports, forceConsistentCasingInFileNames, useDefineForClassFields, esModuleInterop) rely on TypeScript 6 defaults.

OptionValueEffect
exactOptionalPropertyTypestrueOptional properties are strictly T | undefined
noFallthroughCasesInSwitchtrueErrors on fallthrough switch cases
noImplicitOverridetrueRequires override keyword on class member overrides
noImplicitReturnstrueErrors when not all code paths return a value
noPropertyAccessFromIndexSignaturetrueDisallows dot access for index-signature-only properties
noUncheckedIndexedAccesstrueAdds undefined to index-signature access types
noUnusedLocalstrueErrors on unused local variables
noUnusedParameterstrueErrors on unused function parameters
allowUnreachableCodefalseErrors on unreachable code
allowUnusedLabelsfalseErrors on unused labels
moduleDetection"force"All files treated as ES modules
resolveJsonModuletrueAllows importing .json files as typed modules
types[]Blocks ambient @types/* auto-discovery
noEmitOnErrortruePrevents emit when type errors are present
verbatimModuleSyntaxtruePreserves import/export syntax as written
isolatedModulestrueEach file can be safely transpiled in isolation
erasableSyntaxOnlytrueNo enums, namespaces, or parameter properties
target"es2025"ES2025 JavaScript output
lib["ES2025"]ES2025 built-in type declarations
skipLibChecktrueSkips type checking of .d.ts files

Library development

Extends base with emit settings for .d.ts generation and incremental builds.

OptionValueEffect
allowImportingTsExtensionstrueAllows .ts/.tsx extension imports in source
rewriteRelativeImportExtensionstrueRewrites .ts/.tsx import extensions to .js/.jsx on emit
declarationtrueEmits .d.ts type declaration files
declarationMaptrueSource maps for .d.ts ("Go to Definition" navigates to source)
sourceMaptrueGenerates .js.map source maps
isolatedDeclarationstrueRequires explicit type annotations on exports
compositetrueEnables project references and incremental compilation

Library production

Extends library development; strips debug artifacts for smaller, cleaner output.

OptionValueEffect
sourceMapfalseDisables .js.map source maps
declarationMapfalseDisables .d.ts.map source maps
removeCommentstrueStrips comments from emitted JavaScript
stripInternaltrueRemoves @internal declarations from .d.ts output

React JSX application

Extends base for React applications with DOM types and no-emit mode.

OptionValueEffect
allowImportingTsExtensionstrueAllows .ts/.tsx extension imports
noEmittrueBundler handles output
jsx"react-jsx"Automatic JSX runtime (no import React needed)
lib["ES2025", "DOM", "DOM.Iterable", "DOM.AsyncIterable"]ES2025 + DOM + iterable/async iterable DOM APIs

Vite + React JSX application

Extends React JSX application with Vite-specific type declarations.

OptionValueEffect
types["vite/client"]Vite client types (import.meta.env, import.meta.hot, asset imports)

Node

Extends base for Node.js tooling files (build configs, scripts) processed by bundlers.

OptionValueEffect
allowImportingTsExtensionstrueAllows .ts extension imports
types["node"]Node.js global and built-in module types
noEmittrueBundler handles output

Contributing

Issues and pull requests are welcome at dvashim/typescript-config.

This project uses Changesets for versioning — run pnpm run changeset alongside your change to describe it. See the CHANGELOG for release history.

License

MIT © Aleksei Reznichenko

Keywords

config

FAQs

Package last updated on 11 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts