tsconfig/bases

repository·main·Indexed 27 days ago

https://github.com/tsconfig/bases

A centralized repository of recommended TypeScript configurations (TSConfigs) tuned for specific runtime environments such as Node, Bun, and Deno, as well as frameworks including React, Next.js, Svelte, and others. It provides individual packages like @tsconfig/recommended, @tsconfig/strictest, and version-specific Node.js configurations (e.g., @tsconfig/node20) that can be extended in a project's tsconfig.json.

Tokens
2.6K
Snippets
24
Records
24
Agent score
93%

What's inside tsconfig-bases

  1. Install and use @tsconfig/next

    main

    Install the TypeScript configuration tuned for Next.js.

    Installation:

    npm install --save-dev @tsconfig/next
    yarn add --dev @tsconfig/next

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/next/tsconfig.json"
  2. Install and use @tsconfig/strictest

    main

    Install the strictest available TypeScript configuration.

    Installation:

    npm install --save-dev @tsconfig/strictest
    yarn add --dev @tsconfig/strictest

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/strictest/tsconfig.json"
  3. Install a TSConfig base package

    main

    To use a specific TSConfig base, install the corresponding package as a development dependency using npm or yarn. Replace [filename] with the specific package name you wish to use (e.g., node-lts, next, react).

    npm install --save-dev @tsconfig/[filename]
    yarn add --dev @tsconfig/[filename]
  4. Install and use @tsconfig/deno

    main

    Install the TypeScript configuration tuned for Deno.

    Installation:

    npm install --save-dev @tsconfig/deno
    yarn add --dev @tsconfig/deno

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/deno/tsconfig.json"
  5. Install and use @tsconfig/cypress

    main

    Install the TypeScript configuration tuned for Cypress.

    Installation:

    npm install --save-dev @tsconfig/cypress
    yarn add --dev @tsconfig/cypress

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/cypress/tsconfig.json"
  6. Install and use @tsconfig/bases

    main

    Install the collection of all base TSConfigs.

    Installation:

    npm install --save-dev @tsconfig/bases
    yarn add --dev @tsconfig/bases

    Usage: Extend a specific base directly from the @tsconfig/bases package:

    // "extends": "@tsconfig/bases/<base>"
    "extends": "@tsconfig/bases/node-lts"
  7. Install and use @tsconfig/svelte

    main

    Install the TypeScript configuration tuned for Svelte.

    Installation:

    npm install --save-dev @tsconfig/svelte
    yarn add --dev @tsconfig/svelte

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/svelte/tsconfig.json"

    NOTE: After @tsconfig/svelte@2.0.0, you should add /// <reference types="svelte" /> to a d.ts or a index.ts(entry) file to prevent typescript error.

  8. Install and use @tsconfig/create-react-app

    main

    Install the TypeScript configuration tuned for Create React App.

    Installation:

    npm install --save-dev @tsconfig/create-react-app
    yarn add --dev @tsconfig/create-react-app

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/create-react-app/tsconfig.json"
  9. Install and use @tsconfig/qjsengine

    main

    Install the TypeScript configuration tuned for QJSEngine.

    Installation:

    npm install --save-dev @tsconfig/qjsengine
    yarn add --dev @tsconfig/qjsengine

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/qjsengine/tsconfig.json"
  10. Install and use @tsconfig/recommended

    main

    Install the recommended TypeScript configuration for general use. This provides a baseline configuration tuned for stability.

    Installation:

    npm install --save-dev @tsconfig/recommended
    yarn add --dev @tsconfig/recommended

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/recommended/tsconfig.json"
  11. Install and use @tsconfig/ember

    main

    Install the TypeScript configuration tuned for Ember.

    Installation:

    npm install --save-dev @tsconfig/ember
    yarn add --dev @tsconfig/ember

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/ember/tsconfig.json"

    NOTE: You may need to add "baseUrl": "." to your tsconfig.json to support proper file resolution.

  12. Install and use @tsconfig/docusaurus

    main

    Install the TypeScript configuration tuned for Docusaurus v2.

    Installation:

    npm install --save-dev @tsconfig/docusaurus
    yarn add --dev @tsconfig/docusaurus

    Usage: Add the following to your tsconfig.json:

    "extends": "@tsconfig/docusaurus/tsconfig.json"

    NOTE: You may need to add "baseUrl": "." to your tsconfig.json to support proper file resolution.