Install command
Provided
Automatically runs TypeScript compiler checks after editing .ts or .tsx files to catch type errors early.
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Provided
Config snippet
Provided
Copy snippet
Provided
Prerequisites
None
Platforms
1 listed
Difficulty
0/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Safety & privacy surface
1 safety and 1 privacy notes across 2 risk areas. Review closely: credentials & tokens, permissions & scopes.
#!/bin/bash
# Read the tool input from stdin
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
# Check if this is a TypeScript file
if [[ "$FILE_PATH" == *.ts ]] || [[ "$FILE_PATH" == *.tsx ]]; then
echo "🔍 TypeScript Compilation Checker - Validating TypeScript code..."
echo "📄 File: $FILE_PATH"
# Check if file exists
if [ ! -f "$FILE_PATH" ]; then
echo "⚠️ File not found: $FILE_PATH"
exit 1
fi
# Check if TypeScript is available
if ! command -v npx >/dev/null 2>&1; then
echo "⚠️ npx not found - please install Node.js"
exit 1
fi
if ! npx tsc --version >/dev/null 2>&1; then
echo "⚠️ TypeScript not found - install with: npm install -g typescript"
exit 1
fi
# Get TypeScript version
TS_VERSION=$(npx tsc --version 2>/dev/null | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
echo "📦 TypeScript version: $TS_VERSION"
# Check for tsconfig.json
if [ -f "tsconfig.json" ]; then
echo "⚙️ Using project tsconfig.json"
CONFIG_FLAG=""
else
echo "⚠️ No tsconfig.json found - using default configuration"
CONFIG_FLAG="--strict --target es2020 --module esnext --moduleResolution node"
fi
echo "🔍 Running TypeScript compilation check..."
# Run TypeScript compiler in no-emit mode
if npx tsc --noEmit $CONFIG_FLAG "$FILE_PATH" 2>&1; then
echo "✅ TypeScript compilation successful - no type errors found"
# Additional file analysis
echo ""
echo "📊 File Analysis:"
# Count interfaces, types, classes
INTERFACES=$(grep -c '^interface\\|^export interface' "$FILE_PATH" 2>/dev/null || echo 0)
TYPES=$(grep -c '^type\\|^export type' "$FILE_PATH" 2>/dev/null || echo 0)
CLASSES=$(grep -c '^class\\|^export class' "$FILE_PATH" 2>/dev/null || echo 0)
FUNCTIONS=$(grep -c '^function\\|^export function' "$FILE_PATH" 2>/dev/null || echo 0)
echo " • Interfaces: $INTERFACES"
echo " • Type aliases: $TYPES"
echo " • Classes: $CLASSES"
echo " • Functions: $FUNCTIONS"
# Check for any usage
if grep -q ': any' "$FILE_PATH" 2>/dev/null; then
ANY_COUNT=$(grep -c ': any' "$FILE_PATH" 2>/dev/null || echo 0)
echo " • ⚠️ 'any' types found: $ANY_COUNT (consider more specific types)"
fi
# Check for strict mode compliance
if grep -q '"use strict"' "$FILE_PATH" 2>/dev/null; then
echo " • ✅ Strict mode enabled"
fi
else
echo "❌ TypeScript compilation failed - type errors detected"
echo ""
echo "💡 Common fixes:"
echo " • Check for missing type annotations"
echo " • Verify import statements are correct"
echo " • Ensure all variables are properly typed"
echo " • Check for undefined/null value handling"
echo " • Verify function return types match implementation"
exit 1
fi
# Project-wide TypeScript health check
echo ""
echo "🏗️ Project TypeScript Health:"
# Count total TypeScript files
TS_FILES=$(find . -name "*.ts" -o -name "*.tsx" | grep -v node_modules | wc -l)
echo " • Total TS/TSX files: $TS_FILES"
# Check if project compiles
if [ -f "tsconfig.json" ]; then
echo " • 🔍 Checking project compilation..."
if npx tsc --noEmit >/dev/null 2>&1; then
echo " • ✅ Project compiles successfully"
else
echo " • ⚠️ Project has compilation errors - run 'npx tsc --noEmit' for details"
fi
fi
echo ""
echo "💡 TypeScript Best Practices:"
echo " • Use strict TypeScript configuration"
echo " • Avoid 'any' types when possible"
echo " • Use union types for multiple possibilities"
echo " • Implement proper error handling with typed exceptions"
echo " • Use interface segregation principle"
echo ""
echo "🎯 TypeScript validation complete!"
else
echo "ℹ️ File is not a TypeScript file: $FILE_PATH"
fi
exit 0{
"hooks": {
"postToolUse": {
"script": "./.claude/hooks/typescript-compilation-checker.sh",
"matchers": [
"write",
"edit"
]
}
}
}.claude/settings.local.json~/.claude/settings.json.claude/settings.json{
"hooks": {
"postToolUse": {
"script": "./.claude/hooks/typescript-compilation-checker.sh",
"matchers": ["write", "edit"]
}
}
}
#!/bin/bash
# Read the tool input from stdin
INPUT=$(cat)
TOOL_NAME=$(echo "$INPUT" | jq -r '.tool_name')
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
# Check if this is a TypeScript file
if [[ "$FILE_PATH" == *.ts ]] || [[ "$FILE_PATH" == *.tsx ]]; then
echo "🔍 TypeScript Compilation Checker - Validating TypeScript code..."
echo "📄 File: $FILE_PATH"
# Check if file exists
if [ ! -f "$FILE_PATH" ]; then
echo "⚠️ File not found: $FILE_PATH"
exit 1
fi
# Check if TypeScript is available
if ! command -v npx >/dev/null 2>&1; then
echo "⚠️ npx not found - please install Node.js"
exit 1
fi
if ! npx tsc --version >/dev/null 2>&1; then
echo "⚠️ TypeScript not found - install with: npm install -g typescript"
exit 1
fi
# Get TypeScript version
TS_VERSION=$(npx tsc --version 2>/dev/null | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
echo "📦 TypeScript version: $TS_VERSION"
# Check for tsconfig.json
if [ -f "tsconfig.json" ]; then
echo "⚙️ Using project tsconfig.json"
CONFIG_FLAG=""
else
echo "⚠️ No tsconfig.json found - using default configuration"
CONFIG_FLAG="--strict --target es2020 --module esnext --moduleResolution node"
fi
echo "🔍 Running TypeScript compilation check..."
# Run TypeScript compiler in no-emit mode
if npx tsc --noEmit $CONFIG_FLAG "$FILE_PATH" 2>&1; then
echo "✅ TypeScript compilation successful - no type errors found"
# Additional file analysis
echo ""
echo "📊 File Analysis:"
# Count interfaces, types, classes
INTERFACES=$(grep -c '^interface\\|^export interface' "$FILE_PATH" 2>/dev/null || echo 0)
TYPES=$(grep -c '^type\\|^export type' "$FILE_PATH" 2>/dev/null || echo 0)
CLASSES=$(grep -c '^class\\|^export class' "$FILE_PATH" 2>/dev/null || echo 0)
FUNCTIONS=$(grep -c '^function\\|^export function' "$FILE_PATH" 2>/dev/null || echo 0)
echo " • Interfaces: $INTERFACES"
echo " • Type aliases: $TYPES"
echo " • Classes: $CLASSES"
echo " • Functions: $FUNCTIONS"
# Check for any usage
if grep -q ': any' "$FILE_PATH" 2>/dev/null; then
ANY_COUNT=$(grep -c ': any' "$FILE_PATH" 2>/dev/null || echo 0)
echo " • ⚠️ 'any' types found: $ANY_COUNT (consider more specific types)"
fi
# Check for strict mode compliance
if grep -q '"use strict"' "$FILE_PATH" 2>/dev/null; then
echo " • ✅ Strict mode enabled"
fi
else
echo "❌ TypeScript compilation failed - type errors detected"
echo ""
echo "💡 Common fixes:"
echo " • Check for missing type annotations"
echo " • Verify import statements are correct"
echo " • Ensure all variables are properly typed"
echo " • Check for undefined/null value handling"
echo " • Verify function return types match implementation"
exit 1
fi
# Project-wide TypeScript health check
echo ""
echo "🏗️ Project TypeScript Health:"
# Count total TypeScript files
TS_FILES=$(find . -name "*.ts" -o -name "*.tsx" | grep -v node_modules | wc -l)
echo " • Total TS/TSX files: $TS_FILES"
# Check if project compiles
if [ -f "tsconfig.json" ]; then
echo " • 🔍 Checking project compilation..."
if npx tsc --noEmit >/dev/null 2>&1; then
echo " • ✅ Project compiles successfully"
else
echo " • ⚠️ Project has compilation errors - run 'npx tsc --noEmit' for details"
fi
fi
echo ""
echo "💡 TypeScript Best Practices:"
echo " • Use strict TypeScript configuration"
echo " • Avoid 'any' types when possible"
echo " • Use union types for multiple possibilities"
echo " • Implement proper error handling with typed exceptions"
echo " • Use interface segregation principle"
echo ""
echo "🎯 TypeScript validation complete!"
else
echo "ℹ️ File is not a TypeScript file: $FILE_PATH"
fi
exit 0
Complete hook script that automatically runs TypeScript compilation checks after editing .ts or .tsx files
#!/bin/bash
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
if [[ "$FILE_PATH" == *.ts ]] || [[ "$FILE_PATH" == *.tsx ]]; then
echo "🔍 TypeScript Compilation Checker - Validating TypeScript code..."
echo "📄 File: $FILE_PATH"
if [ ! -f "$FILE_PATH" ]; then
echo "⚠️ File not found: $FILE_PATH"
exit 1
fi
if ! command -v npx >/dev/null 2>&1; then
echo "⚠️ npx not found - please install Node.js"
exit 1
fi
if ! npx tsc --version >/dev/null 2>&1; then
echo "⚠️ TypeScript not found - install with: npm install -g typescript"
exit 1
fi
TS_VERSION=$(npx tsc --version 2>/dev/null | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
echo "📦 TypeScript version: $TS_VERSION"
if [ -f "tsconfig.json" ]; then
echo "⚙️ Using project tsconfig.json"
CONFIG_FLAG=""
else
echo "⚠️ No tsconfig.json found - using default configuration"
CONFIG_FLAG="--strict --target es2020 --module esnext --moduleResolution node"
fi
echo "🔍 Running TypeScript compilation check..."
if npx tsc --noEmit $CONFIG_FLAG "$FILE_PATH" 2>&1; then
echo "✅ TypeScript compilation successful - no type errors found"
else
echo "❌ TypeScript compilation failed - type errors detected"
exit 1
fi
else
echo "ℹ️ File is not a TypeScript file: $FILE_PATH"
fi
exit 0
Complete hook configuration for .claude/settings.json to enable automatic TypeScript compilation checking
{
"hooks": {
"postToolUse": {
"script": "./.claude/hooks/typescript-compilation-checker.sh",
"matchers": ["write", "edit"]
}
}
}
Enhanced hook script with file analysis, type counting, and 'any' type detection
#!/bin/bash
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
if [[ "$FILE_PATH" == *.ts ]] || [[ "$FILE_PATH" == *.tsx ]]; then
echo "🔍 TypeScript Compilation Checker - Validating TypeScript code..."
if [ -f "tsconfig.json" ]; then
if npx tsc --noEmit --skipLibCheck "$FILE_PATH" 2>&1; then
echo "✅ TypeScript compilation successful"
INTERFACES=$(grep -c '^interface\|^export interface' "$FILE_PATH" 2>/dev/null || echo 0)
TYPES=$(grep -c '^type\|^export type' "$FILE_PATH" 2>/dev/null || echo 0)
CLASSES=$(grep -c '^class\|^export class' "$FILE_PATH" 2>/dev/null || echo 0)
FUNCTIONS=$(grep -c '^function\|^export function' "$FILE_PATH" 2>/dev/null || echo 0)
echo "📊 File Analysis:"
echo " • Interfaces: $INTERFACES"
echo " • Type aliases: $TYPES"
echo " • Classes: $CLASSES"
echo " • Functions: $FUNCTIONS"
if grep -q ': any' "$FILE_PATH" 2>/dev/null; then
ANY_COUNT=$(grep -c ': any' "$FILE_PATH" 2>/dev/null || echo 0)
echo " • ⚠️ 'any' types found: $ANY_COUNT (consider more specific types)"
fi
else
echo "❌ TypeScript compilation failed - type errors detected"
exit 1
fi
fi
fi
exit 0
Enhanced hook script with project-wide TypeScript health check and tsconfig.json integration
#!/bin/bash
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // .tool_input.path // ""')
if [ -z "$FILE_PATH" ]; then
exit 0
fi
if [[ "$FILE_PATH" == *.ts ]] || [[ "$FILE_PATH" == *.tsx ]]; then
echo "🔍 TypeScript Compilation Checker - Validating TypeScript code..."
if [ -f "tsconfig.json" ]; then
echo "⚙️ Using project tsconfig.json"
if npx tsc --noEmit --skipLibCheck 2>&1; then
echo "✅ Project compiles successfully"
else
echo "⚠️ Project has compilation errors - run 'npx tsc --noEmit' for details"
fi
else
echo "⚠️ No tsconfig.json found - using default configuration"
if npx tsc --noEmit --strict --target es2020 --module esnext --moduleResolution node "$FILE_PATH" 2>&1; then
echo "✅ TypeScript compilation successful"
else
echo "❌ TypeScript compilation failed - type errors detected"
exit 1
fi
fi
fi
exit 0
Example TypeScript compilation checker configuration for customizing compilation checking behavior
{
"typescript_compilation_checker": {
"enabled": true,
"no_emit": true,
"skip_lib_check": true,
"strict_mode": true,
"file_extensions": [".ts", ".tsx"],
"tsconfig_path": "tsconfig.json",
"default_config": {
"strict": true,
"target": "es2020",
"module": "esnext",
"moduleResolution": "node"
},
"analysis": {
"count_interfaces": true,
"count_types": true,
"count_classes": true,
"count_functions": true,
"detect_any_types": true
},
"project_health_check": true,
"exclude_patterns": ["**/node_modules/**", "**/dist/**", "**/build/**"]
}
}
TypeScript follows imports checking dependencies. Add --skipLibCheck: 'tsc --noEmit --skipLibCheck "$FILE_PATH"' or use --isolatedModules for single-file validation without imports. Verify tsconfig.json includes/excludes. Check TypeScript version.
Missing @types packages or wrong moduleResolution. Install types: 'npm install --save-dev @types/node @types/react'. Set tsconfig: '"moduleResolution": "node"' or "bundler". Verify node_modules structure. Check TypeScript version compatibility.
Different TS versions between CLI and editor. Check: 'npx tsc --version' vs VSCode version. Sync: install workspace TS: 'npm install --save-dev typescript@latest'. Restart VSCode. Verify tsconfig.json is being used by both.
grep pattern only finds explicit ': any'. Enable noImplicitAny in tsconfig.json. Or check tsc output: parse 'implicitly has an any type' from compilation errors for complete detection. Verify strict mode settings.
Full tsc scans thousands of files. Skip or timeout: 'timeout 10 npx tsc --noEmit >/dev/null 2>&1' with exit code check. Or remove: comment out project compilation section. Use --skipLibCheck to speed up. Configure tsconfig.json includes/excludes.
Verify TypeScript installation: 'npm list typescript' or 'npx tsc --version'. Install globally: 'npm install -g typescript' or locally: 'npm install --save-dev typescript'. Check PATH. Verify Node.js version compatibility.
Verify tsconfig.json exists in project root. Check file permissions. Use explicit path: 'npx tsc --project tsconfig.json --noEmit'. Verify tsconfig.json syntax is valid JSON. Check for multiple tsconfig.json files.
Use --skipLibCheck flag: 'npx tsc --noEmit --skipLibCheck'. Configure tsconfig.json: '"skipLibCheck": true'. Verify @types packages are installed. Check TypeScript version supports skipLibCheck.
TypeScript Checker side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Automatically runs TypeScript compiler checks after editing .ts or .tsx files to catch type errors early. Open dossier | Automatically compiles and validates Svelte components when they are modified. Open dossier | Automated accessibility testing and compliance checking for web applications following WCAG 2.1 and WCAG 2.2 guidelines. This hook automatically runs accessibility scans on HTML files after they are written or edited, using axe-core for comprehensive WCAG compliance testing. Open dossier | Validates AWS CloudFormation templates for syntax errors and best practices using cfn-lint v1.40.4+ and AWS CLI v2.27.54+. Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| Submitter | — | — | — | — |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | |
| Category | hooks | hooks | hooks | hooks |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | JSONbored |
| Added | 2025-09-19 | 2025-09-19 | 2025-09-19 | 2025-09-19 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Runs automatically on its configured Claude Code hook event and executes shell logic that can read, modify, or delete files in your project (and may run builds, installs, or network calls); review the script and scope it to expected paths before enabling. | ✓Runs automatically after write/edit tool use for .svelte files and may invoke npx svelte-check inside the current project. Uses the local project toolchain and dependencies, so validation can be slow or fail when Svelte dependencies are missing. | ✓Runs automatically on its configured Claude Code hook event and executes shell logic that can read, modify, or delete files in your project (and may run builds, installs, or network calls); review the script and scope it to expected paths before enabling. | ✓Runs automatically on its configured Claude Code hook event and executes shell logic that can read, modify, or delete files in your project (and may run builds, installs, or network calls); review the script and scope it to expected paths before enabling. |
| Privacy notes | ✓Receives Claude Code hook input (session metadata, file paths, and tool output) and reads local project files; review what the script logs or forwards to external services and keep credentials out of its output. | ✓Reads modified .svelte components, package.json, svelte.config.js, and vite.config.js to infer framework, component, accessibility, and performance signals. Prints component statistics and validation output to the local Claude Code hook output stream. | ✓Receives Claude Code hook input (session metadata, file paths, and tool output) and reads local project files; review what the script logs or forwards to external services and keep credentials out of its output. | ✓Receives Claude Code hook input (session metadata, file paths, and tool output) and reads local project files; review what the script logs or forwards to external services and keep credentials out of its output. |
| Prerequisites | — none listed | — none listed | — none listed | — none listed |
| Install | | | | |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.