No slash command · from typescript-plugin
Configures TypeScript strict mode with modern tsconfig.json settings, strict flags, Bundler/NodeNext moduleResolution, and verbatimModuleSyntax. Useful when setting up new TS projects or migrating to stricter type safety.
Ships in typescript-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Modern TypeScript configuration with strict type checking for maximum safety and developer experience. This guide focuses on TypeScript 5.x best practices for 2025.
What is Strict Mode?
Key Capabilities
{
"compilerOptions": {
// Type Checking
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
// Modules
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": false,
"verbatimModuleSyntax": true,
// Emit
"target": "ES2022",
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"outDir": "dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"removeComments": false,
"noEmit": false,
// Interop
"isolatedModules": true,
"allowJs": false,
"checkJs": false,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "build"]
}
strict: true (Umbrella Flag)Enables all strict type-checking options:
{
"strict": true
// Equivalent to:
// "noImplicitAny": true,
// "strictNullChecks": true,
// "strictFunctionTypes": true,
// "strictBindCallApply": true,
// "strictPropertyInitialization": true,
// "noImplicitThis": true,
// "alwaysStrict": true
}
Always enable strict: true for new projects.
| Flag | Purpose |
|---|---|
noUncheckedIndexedAccess | Index signatures return T | undefined instead of T |
noImplicitOverride | Require override keyword for overridden methods |
noPropertyAccessFromIndexSignature | Force bracket notation for index signatures |
noFallthroughCasesInSwitch | Prevent fallthrough in switch statements |
exactOptionalPropertyTypes | Optional properties cannot be set to undefined explicitly |
noUncheckedIndexedAccess (Essential)// With noUncheckedIndexedAccess
const users: Record<string, User> = {};
const user = users['john'];
// Type: User | undefined (correct - must check before use)
if (user) {
console.log(user.name); // Type narrowed to User
}
Always enable this flag to prevent runtime errors.
| Strategy | Use For | Extensions Required |
|---|---|---|
Bundler | Vite, Webpack, Bun projects | No |
NodeNext | Node.js libraries and servers | Yes (.js) |
moduleResolution: "Bundler" (Vite/Bun){
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler"
}
}
exports field supportmoduleResolution: "NodeNext" (Node.js){
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
}
type: "module".js extensions (even for .ts files)Prevents TypeScript from rewriting imports/exports.
{
"compilerOptions": {
"verbatimModuleSyntax": true
}
}
// Error: 'User' is a type and must be imported with 'import type'
import { User } from './types';
// Correct
import type { User } from './types';
// Correct (mixed import)
import { fetchUser, type User } from './api';
Replaces deprecated importsNotUsedAsValues and preserveValueImports.
| Context | Command |
|---|---|
| Check errors | bunx tsc --noEmit |
| Check single file | bunx tsc --noEmit src/utils.ts |
| Show config | bunx tsc --showConfig |
| Check module resolution | bunx tsc --showConfig | grep moduleResolution |
| Flag | Value | Category |
|---|---|---|
strict | true | Type Checking |
noUncheckedIndexedAccess | true | Type Checking |
noImplicitOverride | true | Type Checking |
noPropertyAccessFromIndexSignature | true | Type Checking |
noFallthroughCasesInSwitch | true | Type Checking |
module | ESNext / NodeNext | Modules |
moduleResolution | Bundler / NodeNext | Modules |
verbatimModuleSyntax | true | Modules |
target | ES2022 | Emit |
lib | add "ESNext" (TS 6.0+) for Temporal types; see typescript-temporal | Type Checking |
isolatedModules | true | Interop |
skipLibCheck | true | Interop |
For detailed examples, advanced patterns, and best practices, see REFERENCE.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub laurigates/claude-plugins --plugin typescript-plugin18 skills in this plugin
/biome-toolingBiome all-in-one JS/TS formatter and linter, 15-20x faster than ESLint/Prettier. Use when setting up formatting/linting or migrating from ESLint+Prettier./bun-addBun add: install a package, add dev dependency, pin exact version, or target a workspace. Use when the user wants to add/install a specific package with bun./bun-buildBun build: bundle or compile JS/TS to production bundle or standalone binary. Use when the user wants to bundle, compile, or build for browser/bun/node target.Other plugins' skills for the same job