Use for TypeScript linting, formatting, type checking, test coverage, and project validation. Covers ESLint, Prettier, Biome, tsc, and Vitest coverage.
From psnnpx claudepluginhub aladac/claude-pluginsThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Optimizes cloud costs on AWS, Azure, GCP via rightsizing, tagging strategies, reserved instances, spot usage, and spending analysis. Use for expense reduction and governance.
Comprehensive guide to TypeScript linting, formatting, type checking, and coverage.
// tsconfig.json
{
"compilerOptions": {
// Strictness (non-negotiable)
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"exactOptionalPropertyTypes": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitOverride": true,
// Module resolution
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"resolveJsonModule": true,
// Output
"target": "ES2022",
"outDir": "dist",
"declaration": true,
"sourceMap": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
# Type check only (no emit)
npx tsc --noEmit
# Build
npx tsc
# Watch mode
npx tsc --watch
npm install -D eslint @eslint/js typescript-eslint
// eslint.config.js
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
ignores: ['dist/', 'node_modules/', 'coverage/'],
}
);
# Check
npx eslint src/
# Fix
npx eslint --fix src/
npm install -D prettier
// .prettierrc
{
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2
}
# Check
npx prettier --check src/
# Fix
npx prettier --write src/
Modern replacement for ESLint + Prettier:
npm install -D @biomejs/biome
// biome.json
{
"$schema": "https://biomejs.dev/schemas/1.5.0/schema.json",
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": { "recommended": true }
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always"
}
}
}
# Check all
npx biome check src/
# Fix all
npx biome check --apply src/
// vitest.config.ts
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: ['node_modules/', 'dist/', '**/*.d.ts'],
},
},
});
# Run with coverage
npx vitest --coverage
# Generate HTML report
npx vitest --coverage --reporter=html
Run all checks:
# ESLint + Prettier
npx tsc --noEmit && npx eslint src/ && npx prettier --check src/ && npx vitest
# Biome
npx tsc --noEmit && npx biome check src/ && npx vitest
npm install -D husky lint-staged
npx husky init
// package.json
{
"lint-staged": {
"*.ts": ["eslint --fix", "prettier --write"],
"*.{json,md}": "prettier --write"
}
}
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- name: Type check
run: npx tsc --noEmit
- name: Lint
run: npx eslint src/
- name: Format check
run: npx prettier --check src/
- name: Test
run: npx vitest --coverage
- uses: codecov/codecov-action@v4
{
"scripts": {
"build": "tsc",
"typecheck": "tsc --noEmit",
"lint": "eslint src/",
"lint:fix": "eslint --fix src/",
"format": "prettier --write src/",
"format:check": "prettier --check src/",
"test": "vitest",
"test:coverage": "vitest --coverage",
"check": "npm run typecheck && npm run lint && npm run test",
"fix": "npm run lint:fix && npm run format"
}
}
| Operation | ESLint + Prettier | Biome |
|---|---|---|
| Type check | tsc --noEmit | tsc --noEmit |
| Lint check | eslint src/ | biome lint src/ |
| Lint fix | eslint --fix src/ | biome check --apply src/ |
| Format check | prettier --check src/ | biome format --check src/ |
| Format fix | prettier --write src/ | biome format --write src/ |
| All checks | npm run check | biome check src/ |
| All fixes | npm run fix | biome check --apply src/ |
strict: true