Package detail

@supercharge/tsconfig

supercharge727MIT8.0.1

Shareable TypeScript config

tsconfig, esm, typescript, ts

readme



Supercharge shareable TypeScript Config

Shared TypeScript config for Supercharge projects


Installation · Usage



Latest Version Monthly downloads

Follow @marcuspoehls and @superchargejs for updates!


Installation

npm i -D @supercharge/tsconfig

Targets

Major Release Node.js version Module System
8.x 22.x ESM
7.x 20.x ESM
6.x 20.x CommonJS
5.x 18.x CommonJS
4.x 16.x CommonJS
3.x 14.x CommonJS
2.x 12.x CommonJS
1.x 8.x CommonJS

Usage

Create a tsconfig.json file in your project and extends the @supercharge/tsconfig TypeScript config:

Basic Usage

When installed, configure your tsconfig.json like this:

{
  "extends": "@supercharge/tsconfig",
  "compilerOptions": {
    "outDir": "dist"
  }
}

Refined Configuration

You can refine your tsconfig.json to your needs. Let’s say you want to target Node.js v16. Change your compilerOptions to this:

{
  "extends": "@supercharge/tsconfig",
  "display": "Node.js v16",

  "compilerOptions": {
    "outDir": "dist",
    "target": "ES2021",
    "lib": ["ES2021"]
  }
}

Customizing your compilerOptions when extending the @supercharge/tsconfig package only overrides the listed properties. Every other option defined in the base configuration will be inherited.

Contributing

  1. Create a fork
  2. Create your feature branch: git checkout -b my-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request 🚀

License

MIT © Supercharge


superchargejs.com  ·  GitHub @supercharge  ·  Twitter @superchargejs

changelog

Changelog

8.0.1 - 2024-05-04

Updated

  • bump engine property in package.json to Node.js >= 22

8.0.0 - 2024-05-04

Updated

  • bump target to ES2023 because Node.js 22 supports it (https://node.green/#ES2023)
  • bump engine property in package.json to Node.js >= 22

Breaking Changes

  • target Node.js v22

Notice: version 8.0.0 requires TypeScript version 5.5 or later with support for ES2023. At the time of writing this release note, TypeScript 5.5 is in beta stage. Please don’t upgrade if you’re not fine with running a TypeScript beta version.

7.0.0 - 2023-10-15

Added

Updated

  • bump target and lib to Node.js 20
  • bump engine property in package.json to Node.js >= 20
  • change module from CommonJS to ESNext
  • change moduleResolution from Node to NodeNext
  • change compilerOptions.lib from 2022 to 2023

Breaking Changes

  • target Node.js v20 with ESM

6.0.0 - 2023-10-15

Updated

  • bump target and lib to Node.js 20
  • bump engine property in package.json to Node.js >= 20

Breaking Changes

  • target Node.js v20

5.0.0 - 2023-07-22

Added

Updated

  • bump target and lib to Node.js 18
  • bump engine property in package.json to Node.js >= 18

Breaking Changes

  • target Node.js v18

4.0.0 - 2022-06-16

Added

  • add allowUnreachableCode: false rule
  • add forceConsistentCasingInFileNames: true rule

Updated

  • bump target and lib to Node.js 16
  • bump engine property in package.json to Node.js >= 16

Breaking Changes

  • target Node.js v16

3.1.0 - 2021-08-30

Added

  • add DOM and DOM.Iterable to libs
  • add noImplicitOverride: true option
  • add engine property to package.json requiring Node.js >= 12

3.0.0 - 2021-06-10

Added

  • target and libs require es2020, resolving to Node.js v14

Breaking Changes

  • target to Node.js v14

2.1.0 - 2021-08-30

Added

  • add DOM and DOM.Iterable to libs

2.0.0 - 2021-06-10

Added

  • required libs to to properly resolve Node.js v12

Breaking Changes

  • target to Node.js v12 instead of Node.js v8

1.0.0 - 2020-05-06

Added

  • 1.0.0 release 🚀 🎉