Skip to content

revoxlabs/leftpad

Repository files navigation

TS Leftpad example

TSC config

Setup TS project:

Option 1: Using tsc cli

tsc --init

Using tsc cli, a default tsconfig is created with the following config:

target: es2016
module: commonjs
strict: true
esModuleInterop: true
skipLibCheck: true
forceConsistentCasingInFileNames: true

Option 2: Create tsconfig

Create tsconfig.json with the following recommended options for the following sample project:

{
  "compilerOptions": {
    "strict": true,
    "target": "es2016",
    "module": "ESNext",
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "noEmit": true,
    "isolatedModules": true
  }
}

Eslint & Prettier

For more information please visit the detailed vanilla TS project setup for more help

Initialize pnpm

pnpm init

Install ESlint & Prettier

pnpm i -D eslint \
    eslint-config-prettier \
    eslint-plugin-prettier \
    prettier

Watch using tsc

tsc -w

About

TS sample project using leftpad function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published