Skip to content
Skillpedia
General coding75k · #3068

typescript-strict-mode

What it does

This skill checks a TypeScript project's settings and turns on strict type checking. It is for developers who want the compiler to catch more bugs before code runs.

When to use it

  • ✓When a TypeScript project has no strict setting in tsconfig.json.
  • ✓When a codebase has null errors or implicit any types.
  • ✓When starting a new TypeScript project and choosing the safest settings.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/typescript-strict-mode/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/typescript-strict-mode/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“I have a TypeScript project. Can you check my tsconfig and turn on strict mode if it's safe?”

5 new skills a week. 1 minute to read.

How it works

The agent reads the tsconfig file and checks which strict flags are on. It turns on the missing ones, or enables them step by step if the existing code has many errors.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Enable TypeScript strict mode in tsconfig.json

Without strict mode, TypeScript allows implicit any types, ignores possible null/undefined values, and silently accepts unsound function assignments — meaning the type system gives a false sense of safety. Enabling strict mode makes TypeScript catch the bugs it was designed to prevent, turning type errors into compile-time failures rather than runtime surprises in production.

Quick Reference

  • "strict": true enables strictNullChecks, noImplicitAny, and six other checks
  • Enable strict from project start — retrofitting a large codebase is painful
  • On existing projects: enable strictNullChecks first, then other flags incrementally
  • Strict mode eliminates entire classes of null reference and implicit-any bugs

Check

Inspect the tsconfig.json in this project and report whether "strict": true (or individual strict flags) is enabled. List any missing strict flags.

Fix

Add "strict": true to the compilerOptions in tsconfig.json. If the project has existing type errors, explain how to enable strictNullChecks first as a stepping stone.

Explain

Explain what TypeScript strict mode enables, which individual flags it activates, and why each flag matters for catching real bugs.

Code Review

Check whether the codebase relies on implicit any, unchecked null access, or loose function type assignments that strict mode would reject. Flag the specific patterns and show what stricter types would look like.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/javascript/typescript-strict-mode

FAQ

What does strict mode turn on?

It enables a group of checks, including strictNullChecks and noImplicitAny, that catch common bugs.

What if my project has many type errors?

The skill suggests enabling strictNullChecks first, then the other flags one at a time.

Is it easier to start strict?

The skill says enabling strict mode from the start is much easier than retrofitting a large project later.

Details

Original description by the author

Use when setting up a new TypeScript project, auditing an existing tsconfig.json, or reviewing code where null-reference errors or implicit any types are present.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#3068
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills