Setup TS project:
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
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
}
}
For more information please visit the detailed vanilla TS project setup for more help
pnpm init
pnpm i -D eslint \
eslint-config-prettier \
eslint-plugin-prettier \
prettier
tsc -w