Configuring tsconfig.json for your next ts project

Emmanuel DavidEmmanuel David
1 min read

Want to start your next project in typescript you can easily use this simple configuration file to kick-start it without wasting time

{
  "compilerOptions": {
    "target": "ESNext",
    "useDefineForClassFields": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "strict": true,
    "jsx": "preserve",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "noImplicitAny": true,
    "importHelpers": true,
    "noEmitHelpers": true,
    "forceConsistentCasingInFileNames": true,
    "lib": ["ESNext", "DOM"],
    "skipLibCheck": true,
    "noEmit": true,
    "allowJs": true,
    "baseUrl": "./",
    "preserveSymlinks": true,
    "paths": {
      "@/*": ["src/*"]
    }
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "exclude": ["node_modules", "**/*.spec.ts"],
}
0
Subscribe to my newsletter

Read articles from Emmanuel David directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Emmanuel David
Emmanuel David