Skip to content

Instantly share code, notes, and snippets.

@wmakeev
Last active December 2, 2019 10:51
Show Gist options
  • Save wmakeev/929e36a05f275fa06345ba43bd3568dd to your computer and use it in GitHub Desktop.
Save wmakeev/929e36a05f275fa06345ba43bd3568dd to your computer and use it in GitHub Desktop.
[TypeScript boilerplate] typescript project setup #typescript #npm #deploy #travis #build #boilerplate

TypeScript boilerplate

tsconfig

tsconfig.json

{
  "compilerOptions": {
    /* Basic Options */
    "target": "es6",
    "module": "commonjs",
    "lib": ["es2018"],
    "allowJs": false,
    "outDir": "dist",

    /* Declaration options */
    // "declaration": true,
    // "skipLibCheck": true,
    "stripInternal": true,

    /* Source Map Options */
    "sourceMap": true,

    /* Strict Type-Checking Options */
    "noImplicitAny": true,
    // "strictNullChecks": true,
    // "strictFunctionTypes": true,
    // "strictBindCallApply": true,
    // "strictPropertyInitialization": true,
    "noImplicitThis": true,
    "alwaysStrict": true,
    // "strict": true,

    /* Additional Checks */
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": false,
    "noEmitOnError": true,
    "forceConsistentCasingInFileNames": true,
    // "noFallthroughCasesInSwitch": true,

    /* Module Resolution Options */
    "moduleResolution": "node",
    "types": ["node"],
    "esModuleInterop": true,
    "resolveJsonModule": true,

    /* Experimental Options */
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "pretty": true
  },
  "include": ["src/", "typings/"],
  "exclude": ["node_modules"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment