Registry / typescript-config-silverwind

typescript-config-silverwind

JSON →
library17.0.0jsnpmunverified

The `typescript-config-silverwind` package provides a highly opinionated and actively maintained base TypeScript configuration designed for modern JavaScript and TypeScript projects. Currently at version 17.0.0, this configuration package is typically updated to align with major TypeScript releases and evolving best practices, ensuring projects leverage the latest compiler features and strictness improvements. It serves as a foundational configuration, intended to be extended by project-specific `tsconfig.json` files, simplifying TypeScript setup and promoting consistency across repositories. The package emphasizes strong type checking and modern ECMAScript module patterns. Its key differentiator lies in offering a robust, pre-configured set of `compilerOptions` and `include` directives, aiming to reduce boilerplate and common configuration errors for developers by enforcing a consistent and high-quality TypeScript standard. It's often used as a dependency in other `silverwind` configuration packages, demonstrating its role as a core component in a larger ecosystem of opinionated developer tooling.

npm install typescript-config-silverwind
INSTALL
IMPORT
SIG · TYPESCRIPT-CONFIG-
T
typescript-config-silverwind
javascriptv17.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Configuration Extension
{ "extends": "typescript-config-silverwind" } in tsconfig.json
import { AnyConfig } from 'typescript-config-silverwind';
This package is a TypeScript configuration preset, not a runtime library. It is consumed via the 'extends' property in your project's `tsconfig.json` file, not through JavaScript/TypeScript import statements.
tsconfig.json 'include' pattern
{ "include": ["src/**/*", "test/**/*"] } in tsconfig.json
When extending, your local 'include' and 'exclude' arrays *overwrite* the base config's. Explicitly define all desired files or patterns.
Configuration Override
{ "extends": "typescript-config-silverwind", "compilerOptions": { "target": "es2021" } } in tsconfig.json
Properties in 'compilerOptions' are merged, with your local `tsconfig.json` taking precedence for conflicting options.

Demonstrates how to extend the `typescript-config-silverwind` preset in your project's `tsconfig.json`, including how to override specific `compilerOptions` and correctly specify `include` and `exclude` paths.

{ "extends": "typescript-config-silverwind", "compilerOptions": { // Override specific compiler options if needed "outDir": "./dist", "jsx": "react-jsx" }, "include": [ "src/**/*", "types/**/*", "test/**/*", "**/.*", "**/.*/**/*", "**/.*/**/.*" ], "exclude": [ "node_modules", "dist" ] }
Debug
Known issues
breakingWhen extending `typescript-config-silverwind`, any `include` or `exclude` arrays defined in your project's `tsconfig.json` will *completely replace* those from the base configuration, rather than merging. This can inadvertently omit files from compilation or include unwanted ones, leading to build errors or unexpected type checking behavior.
fix
Always explicitly define all required `include` and `exclude` patterns in your project's `tsconfig.json` when extending this configuration to ensure correct file resolution.
affects: >=1.0.0
breakingEach major version of `typescript-config-silverwind` likely updates its `compilerOptions` to reflect the latest TypeScript best practices and features. These updates can introduce stricter checks (e.g., `noImplicitAny`, `strictNullChecks`, `noUncheckedIndexedAccess`) that might cause existing code to fail compilation, especially if migrating from a less strict setup.
fix
Review the TypeScript release notes for the corresponding major version and adapt your codebase to meet the new strictness requirements. Gradually introduce the new configuration or fix errors as they appear.
affects: >=1.0.0
gotchaThis package is a `tsconfig.json` extender and does not expose any JavaScript/TypeScript modules for direct `import` or `require` statements in application code. Attempting to import symbols from `typescript-config-silverwind` will result in module resolution errors at compile or runtime, as its sole purpose is to configure the TypeScript compiler itself.
fix
Do not attempt to import this package into your `.ts` or `.js` files. Its functionality is purely declarative through the `extends` property in `tsconfig.json`.
affects: >=1.0.0
Errors
Common errors & fixes
error TS6053: File '...' not found.
This error often occurs when the `include` or `exclude` arrays in your project's `tsconfig.json` overwrite the base configuration from `typescript-config-silverwind` and unintentionally omit necessary source files or declaration files.
fix
Ensure your `tsconfig.json`'s `include` patterns explicitly cover all your source files, type declaration files, and other assets required for compilation, as they will completely override the base config's settings.
error TS7006: Parameter 'x' implicitly has an 'any' type.
The `typescript-config-silverwind` configuration likely enables `noImplicitAny`, requiring explicit type annotations for function parameters, variables, or properties where TypeScript cannot infer a specific type.
fix
Add explicit type annotations (e.g., `function foo(param: string)`) to resolve these errors. If an `any` type is truly intended, explicitly declare it (e.g., `param: any`) to satisfy the compiler.
error TS2532: Object is possibly 'undefined'.
This configuration enforces `strictNullChecks`, meaning that `null` and `undefined` are not assignable to types unless explicitly included (e.g., `string | null`). Accessing properties on potentially null or undefined values will result in this error.
fix
Implement proper null/undefined checks (e.g., `if (obj) { obj.property }`), use optional chaining (`obj?.property`), or the non-null assertion operator (`obj!.property`) with caution if you are certain the value is not null/undefined at runtime.
Upgrade
Version history
17.0.0latest on npm
Audit
Dependencies
typescriptrequiredThis package is an 'extends' configuration for TypeScript and requires `typescript` itself to be installed as a peer dependency for compilation.
Agent activity
4 hits · last 30 days
node
4
Resources
typescript-config-silverwind — npm install typescript-config-silverwind · libregistry