name: Format Check

on:
  pull_request:
    branches: [ main ]

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 'lts/*'
          
      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
          
      - name: Install dependencies
        run: npm ci
        
      - name: Check formatting
        run: npm run format:check
