antrophiclove
← Kütüphaneye dön
Kurulum
curl -sL https://www.antrophiclove.com/api/kaynak/lint-on-save/raw

Bu içerik mevcut dosyaya elle harmanlanmalı: .claude/settings.json

lint-on-save

Automatically run linting tools after file modifications

Event Configuration

  • Event Type: PostToolUse
  • Tool Matcher: Edit|MultiEdit|Write
  • Category: development

Environment Variables

  • CLAUDE_TOOL_FILE_PATH

Requirements

  • ESLint for JavaScript/TypeScript files
  • Or other linters based on file type

Script

file_path=$(jq -r '.tool_input.file_path // empty')
if [[ "$file_path" =~ \.(js|jsx|ts|tsx)$ ]]; then
  npx eslint --fix "$file_path" 2>/dev/null || true
elif [[ "$file_path" =~ \.py$ ]]; then
  python3 -m black "$file_path" 2>/dev/null || true
fi