
Security News
TeamPCP and BreachForums Launch $1,000 Contest for Supply Chain Attacks
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.
@dvashim/typescript-config
Advanced tools
Shareable tsconfig.json presets for libraries, React applications, and Node.js tooling — strict ES2025 + ESM defaults with bundler module resolution.
>=6.0.0npm:
npm install -D @dvashim/typescript-config
or pnpm:
pnpm add -D @dvashim/typescript-config
| Name | Path |
|---|---|
| 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 |
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 listed below are set explicitly. Additional options (strict, module: "esnext", moduleResolution: "bundler", noUncheckedSideEffectImports, forceConsistentCasingInFileNames, useDefineForClassFields, esModuleInterop) rely on TypeScript 6 defaults.
| Option | Value | Effect |
|---|---|---|
exactOptionalPropertyTypes | true | Optional properties are strictly T | undefined |
noFallthroughCasesInSwitch | true | Errors on fallthrough switch cases |
noImplicitOverride | true | Requires override keyword on class member overrides |
noImplicitReturns | true | Errors when not all code paths return a value |
noPropertyAccessFromIndexSignature | true | Disallows dot access for index-signature-only properties |
noUncheckedIndexedAccess | true | Adds undefined to index-signature access types |
noUnusedLocals | true | Errors on unused local variables |
noUnusedParameters | true | Errors on unused function parameters |
allowUnreachableCode | false | Errors on unreachable code |
allowUnusedLabels | false | Errors on unused labels |
moduleDetection | "force" | All files treated as ES modules |
resolveJsonModule | true | Allows importing .json files as typed modules |
types | [] | Blocks ambient @types/* auto-discovery |
noEmitOnError | true | Prevents emit when type errors are present |
verbatimModuleSyntax | true | Preserves import/export syntax as written |
isolatedModules | true | Each file can be safely transpiled in isolation |
erasableSyntaxOnly | true | No enums, namespaces, or parameter properties |
target | "es2025" | ES2025 JavaScript output |
lib | ["ES2025"] | ES2025 built-in type declarations |
skipLibCheck | true | Skips type checking of .d.ts files |
Extends base with emit settings for .d.ts generation and incremental builds.
| Option | Value | Effect |
|---|---|---|
allowImportingTsExtensions | true | Allows .ts/.tsx extension imports in source |
rewriteRelativeImportExtensions | true | Rewrites .ts/.tsx import extensions to .js/.jsx on emit |
declaration | true | Emits .d.ts type declaration files |
declarationMap | true | Source maps for .d.ts ("Go to Definition" navigates to source) |
sourceMap | true | Generates .js.map source maps |
isolatedDeclarations | true | Requires explicit type annotations on exports |
composite | true | Enables project references and incremental compilation |
Extends library development; strips debug artifacts for smaller, cleaner output.
| Option | Value | Effect |
|---|---|---|
sourceMap | false | Disables .js.map source maps |
declarationMap | false | Disables .d.ts.map source maps |
removeComments | true | Strips comments from emitted JavaScript |
stripInternal | true | Removes @internal declarations from .d.ts output |
Extends base for React applications with DOM types and no-emit mode.
| Option | Value | Effect |
|---|---|---|
allowImportingTsExtensions | true | Allows .ts/.tsx extension imports |
noEmit | true | Bundler 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 |
Extends React JSX application with Vite-specific type declarations.
| Option | Value | Effect |
|---|---|---|
types | ["vite/client"] | Vite client types (import.meta.env, import.meta.hot, asset imports) |
Extends base for Node.js tooling files (build configs, scripts) processed by bundlers.
| Option | Value | Effect |
|---|---|---|
allowImportingTsExtensions | true | Allows .ts extension imports |
types | ["node"] | Node.js global and built-in module types |
noEmit | true | Bundler handles output |
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.
MIT © Aleksei Reznichenko
FAQs
Shared TypeScript configurations
The npm package @dvashim/typescript-config receives a total of 139 weekly downloads. As such, @dvashim/typescript-config popularity was classified as not popular.
We found that @dvashim/typescript-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.

Research
GemStuffer abuses RubyGems as an exfiltration channel, packaging scraped UK council portal data into junk gems published from new accounts.