repos:
  # PHP CodeSniffer with WordPress Coding Standards
  - repo: local
    hooks:
      - id: phpcs
        name: PHP CodeSniffer
        entry: vendor/bin/phpcs
        language: system
        files: 'plugins/artist-press-zone/.*\.php$'
        args: ['--standard=.dev-config/phpcs.xml', '--report=full']
        
  # PHP-CS-Fixer for PHP code formatting
  - repo: local
    hooks:
      - id: php-cs-fixer
        name: PHP-CS-Fixer
        entry: vendor/bin/php-cs-fixer fix
        language: system
        files: 'plugins/artist-press-zone/.*\.php$'
        args: ['--config=.dev-config/.php-cs-fixer.dist.php', '--dry-run', '--diff']
        
  # Psalm for PHP static analysis
  - repo: local
    hooks:
      - id: psalm
        name: Psalm
        entry: vendor/bin/psalm
        language: system
        files: 'plugins/artist-press-zone/.*\.php$'
        args: ['--config=.dev-config/psalm.xml', '--no-cache']
        
  # ESLint for JavaScript/TypeScript
  - repo: local
    hooks:
      - id: eslint
        name: ESLint
        entry: node_modules/.bin/eslint
        language: system
        files: 'plugins/artist-press-zone/.*\.(js|ts|tsx)$'
        args: ['--config', '.dev-config/eslint.config.mjs']
        
  # Check for trailing whitespace
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
        files: 'plugins/artist-press-zone/'
      - id: end-of-file-fixer
        files: 'plugins/artist-press-zone/'
      - id: check-json
        files: 'plugins/artist-press-zone/'
      - id: check-yaml
        files: 'plugins/artist-press-zone/'
      - id: check-merge-conflict
        files: 'plugins/artist-press-zone/'
