Skip to content
aboutbitsPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

@aboutbits/ts-config

GitHub release license

AboutBit's TypeScript config presets

Usage

Install the package, assuming that you have TypeScript already installed:

npm i -D @aboutbits/ts-config

For TypeScript without React

tsconfig.json

{
  "extends": "@aboutbits/ts-config"
}

For TypeScript with React

tsconfig.json

{
  "extends": "@aboutbits/ts-config/react"
}

Requirements

The presets target ESM-only projects on Node.js 26 that are built with a bundler (tsdown, Vite, Next.js, …) and need TypeScript 6 or newer:

  • module: esnext with moduleResolution: bundler
  • target: es2025, and the React preset adds the DOM to the lib
  • verbatimModuleSyntax, so type-only imports must use import type
  • useDefineForClassFields is on by default with this target: a class field without an initializer is set to undefined after super() and overwrites a value the base class constructor set. Mark such fields with declare.

TypeScript 6 no longer includes @types/* packages automatically. In a Node.js project, install @types/node and add it to the types field:

npm i -D @types/node@^26
{
  "extends": "@aboutbits/ts-config",
  "compilerOptions": {
    "types": ["node"]
  }
}

Build & Publish

To build and publish the package, visit the GitHub Actions page of the repository.

You can choose between two workflows:

  • Release Package to publish a new version of the package.
  • Pre-Release Package to publish a new pre-release version of the package.

Note: Pre-releases need to be supplied with a pre-id.

Note: To increment a pre-release, you have to run the normal release workflow and select "prerelease". For this action you need to already be on a pre-release version.

Information

AboutBits is a company based in South Tyrol, Italy. You can find more information about us on our website.

Support

For support, please contact info@aboutbits.it.

Credits

License

The MIT License (MIT). Please see the license file for more information.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages