name: Update implementation status of all linter plugins

on:
  push:
    branches:
      - main
    paths:
      - 'crates/oxc_linter/src/rules.rs'
      - 'tasks/lint_rules/**'

jobs:
  lint_rules:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Branch
        uses: taiki-e/checkout-action@v1

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version-file: .node-version

      - name: Install latest plugins
        working-directory: tasks/lint_rules
        run: npm install

      - name: Run task
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: node ./tasks/lint_rules --update
