mcpField
T
tsconfig

tsconfig

github.com/gkwaDevelopment090 installsUpdated 5d ago
Repository

About tsconfig

A TypeScript configuration recipe for Vite projects, with settings for strict type checking and optional Chrome extension APIs. It explains key compiler options and the Chrome types package.

Key features

  1. 01ES2020 target and ESNext modules
  2. 02Bundler module resolution
  3. 03Strict type checking
  4. 04Type checking without emitted files
  5. 05Optional Chrome API types

Use cases

  1. 01Configuring TypeScript for Vite
  2. 02Type-checking Chrome extension APIs
  3. 03Preventing TypeScript output from conflicting with Vite

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/gkwa/volcanicviper --skill tsconfig

After installing, type/tsconfigin Claude Code to confirm it loaded.

Bundled filestile.json

Details

From the project README

Add a tsconfig.json with these settings:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "noEmit": true,
    "types": ["chrome", "vitest/globals"],
    "lib": ["ES2020", "DOM", "DOM.Iterable"]
  },
  "include": ["src"]
}

Key options:

  • "moduleResolution": "bundler" — required for Vite to resolve ES modules correctly
  • "types": ["chrome"] — enables IntelliSense and type checking for Chrome extension APIs (chrome.storage, chrome.runtime, etc.); remove if not building a Chrome extension
  • "noEmit": true — lets TypeScript do type checking without conflicting with Vite's compilation
  • "target": "ES2020" — enables async/await, optional chaining, and other modern syntax
  • "strict": true — catches bugs early and enforces consistent coding patterns

Install the Chrome types package if building a Chrome extension:

pnpm add --save-dev @types/chrome

Comments

Markdown supported