@autosoft/tsconfig

1.0.1 • Public • Published

@autosoft/tsconfig

npm typescript

A base for TypeScript projects.

If I should maintain this repo, please ⭐️ GitHub stars

DM me on Twitter if you have questions or suggestions. Twitter Follow


This package includes typescript, ts-node, and a base tsconfig.json, providing a quick way to start TypeScript projects.

Installation

yarn add --dev @autosoft/tsconfig
npm install --save-dev @autosoft/tsconfig
pnpm add --save-dev @autosoft/tsconfig

Usage

In your tsconfig.json file:

{
  "extends": "@autosoft/tsconfig"
}

TSC

To run TSC, run yarn tsc or npm run tsc.

TS-Node

To run TS-Node, run yarn ts-node or npm run ts-node.

For ESM, run yarn ts-node-esm or npm run ts-node-esm.

TSConfig

The config enable strict type checking, and includes SWC for ts-node:

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "declaration": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "isolatedModules": true,
    "lib": [
      "ESNext",
      "DOM"
    ],
    "module": "ESNext",
    "moduleResolution": "Node",
    "noFallthroughCasesInSwitch": true,
    "noImplicitReturns": true,
    "noUncheckedIndexedAccess": true,
    "noUnusedLocals": true,
    "removeComments": false,
    "resolveJsonModule": true,
    "skipLibCheck": true,
    "strict": true,
    "target": "ES2019"
  },
  "ts-node": {
    "esm": true,
    "swc": true
  }
}

Dependenciesdependencies

  • @swc/core: Super-fast alternative for babel
  • @types/node: TypeScript definitions for Node.js
  • ts-node: TypeScript execution environment and REPL for node.js, with source map support
  • typescript: TypeScript is a language for application scale JavaScript development

Dev Dependencies


License license

MIT

Package Sidebar

Install

npm i @autosoft/tsconfig

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

5.07 kB

Total Files

5

Last publish

Collaborators

  • bconnorwhite