Pular para o conteúdo
Skillpedia
Código em geral75 mil · #3068

typescript-strict-mode

O que ela faz

Esta skill verifica as configurações de um projeto TypeScript e ativa a checagem estrita de tipos. É para desenvolvedores que querem que o compilador pegue mais erros antes de o código rodar.

Quando usar

  • ✓Quando um projeto TypeScript não tem a configuração strict no tsconfig.json.
  • ✓Quando uma base de código tem erros de nulo ou tipos any implícitos.
  • ✓Quando você está começando um projeto TypeScript e escolhendo as configurações mais seguras.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/typescript-strict-mode/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Tenho um projeto TypeScript. Você pode checar meu tsconfig e ativar o modo estrito, se for seguro?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente lê o arquivo tsconfig e verifica quais flags estritas estão ativas. Ele ativa as que faltam ou as ativa aos poucos, se o código existente tiver muitos erros.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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

Perguntas frequentes

O que o modo estrito ativa?

Ele liga um conjunto de verificações, incluindo strictNullChecks e noImplicitAny, que pegam erros comuns.

E se meu projeto tiver muitos erros de tipo?

A skill sugere ativar primeiro o strictNullChecks e depois as outras flags, uma de cada vez.

É mais fácil começar já no modo estrito?

A skill diz que ativar o modo estrito desde o início é bem mais fácil do que adaptar um projeto grande depois.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
75 mil
Posição no ranking
#3068
Licença
MIT
Atualizada em
31/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas