Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

static-code-analysis-typescript

БесплатноБез исполняемых скриптовНе проверен

Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint…

jaktestowacот jaktestowac★ 124 звезды на GitHub

Об этом скилле

Static Code Analysis for TypeScript Projects

Use this skill when you need to create, review, fix, or modernize static code analysis in a Node.js + TypeScript repository.

It is designed for repositories that use or should use:

  • eslint (flat config)
  • typescript-eslint
  • typescript
  • tsconfig.json
  • prettier
  • eslint-plugin-simple-import-sort (import sorting via ESLint)
  • husky
  • lint-staged
  • package.json scripts
  • CI quality gates (GitHub Actions)

When to Use

Use this skill when the user asks things like:

  • "set up static analysis for TypeScript"
  • "add ESLint / typescript-eslint / Prettier"
  • "review our lint, tsc, husky, or lint-staged setup"
  • "fix package.json scripts for code quality"
  • "prepare CI checks for linting and type checking"
  • "standardize naming for static code analysis scripts"
  • "audit whether this repo follows current best practices"
  • "set up import sorting"
  • "replace trivago import sorting plugin"
  • "add a CI quality gate workflow"

Goals

This skill should help produce a setup that is:

  • explicit
  • reproducible
  • CI-friendly
  • fast enough for local development
  • strict enough to catch issues early
  • easy to understand from package.json, README.md, and the config files
  • portable across Playwright, Cypress, and general TypeScript projects

Recommended Outcome

A strong baseline should usually include:

  • ESLint flat config (eslint.config.mjs)
  • typescript-eslint for TypeScript-aware linting
  • direct typescript dependency when tsc is used directly
  • strict tsconfig.json
  • clear split between formatting and linting responsibilities
  • import sorting via ESLint (eslint-plugin-simple-import-sort)
  • husky hook for local guardrails
  • lint-staged for staged-file workflows
  • CI commands that do not mutate files
  • explicit Node version support in package.json#engines
  • a CI quality gate (integrated into an existing workflow when one exists)

Concrete baseline files (eslint.config.mjs, package.json scripts, tsconfig, Prettier, Husky, VS Code settings, CI workflows) live in ./resources/example-configs.md.

Procedure

1. Inspect the existing setup

Check at least these files when they exist:

  • package.json
  • eslint.config.* (or legacy .eslintrc*)
  • tsconfig.json
  • .prettierrc*
  • .prettierignore
  • .husky/*
  • .github/workflows/*
  • .vscode/settings.json
  • .vscode/extensions.json
  • README.md
  • any existing audit or decision documents

Identify:

  • what tools are already installed
  • whether the repo uses flat config or legacy ESLint config
  • whether typescript is direct or transitive
  • whether tsc is used as a real gate
  • whether prettier is standalone, inside ESLint, or split by file type
  • whether commit hooks validate the whole repo or only staged files
  • whether CI enforces the same checks as local hooks
  • how import sorting is handled (Prettier plugin, ESLint plugin, VS Code, or not at all)
  • whether VS Code source.organizeImports could conflict with other import sorting

2. Classify the current architecture

Choose the current model before editing anything:

  • Model A - Separate responsibilities: ESLint for code quality; Prettier for formatting; prettier --check used directly; eslint-config-prettier avoids rule conflicts.
  • Model B - ESLint also enforces Prettier in TypeScript: eslint-plugin-prettier runs formatting checks inside ESLint, often paired with a separate Prettier CLI check for non-TS files.
  • Model C - Mixed or inconsistent: scripts overlap, responsibilities are unclear, TS formatting may be checked twice or not clearly at all.

When possible, make the final state explicit in docs so the split is understandable.

3. Normalize dependency expectations

For TypeScript repositories, prefer these principles:

  • if the repo runs tsc, add typescript directly in devDependencies
  • if ESLint is used, make the config style explicit and modern (flat config)
  • if typescript-eslint is installed, ensure versions are compatible with ESLint and TypeScript
  • if tooling requires newer Node versions, declare them in package.json#engines

Typical direct dev dependencies: eslint, @eslint/js, typescript-eslint, typescript, prettier, eslint-config-prettier, eslint-plugin-simple-import-sort, globals, husky, lint-staged, optionally eslint-plugin-prettier and repo-specific plugins such as eslint-plugin-playwright.

If the repository contains Playwright tests, strongly consider:

  • eslint-plugin-playwright
  • Playwright-specific rule tuning in ESLint
  • ignoring generated Playwright artifacts such as playwright-report/** and test-results/**

4. Assess import sorting

Check how imports are currently sorted:

  • No sorting → add eslint-plugin-simple-import-sort
  • @trivago/prettier-plugin-sort-imports → migrate to eslint-plugin-simple-import-sort (Babel parser, no Prettier 4 support)
  • @ianvs/prettier-plugin-sort-imports → consider
Полный SKILL.md на GitHub

Установить static-code-analysis-typescript в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

resources/example-configs.mdresources/import-sorting.mdresources/troubleshooting.md

FAQ

Что делает скилл static-code-analysis-typescript?

Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky, lint-staged, package.json quality scripts, and CI quality gates. Use when setting up or auditing linting, formatting, type-checking, commit hooks, or GitHub Actions quality checks in a TypeScript project.

Как установить скилл static-code-analysis-typescript?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл static-code-analysis-typescript запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить static-code-analysis-typescript с