name: "Let me lint:fix that for you"

on: [push]

jobs:
  LMLFTFY:
    runs-on: ubuntu-latest
    steps:
    - name: "Check out Git repository"
      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
    - name: "Use Node.js 22"
      uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
      with:
        node-version: 22
    - name: "Install application"
      run: |
        npm install --ignore-scripts
        cd frontend
        npm install --ignore-scripts --legacy-peer-deps
    - name: "Fix everything which can be fixed"
      run: 'npm run lint:fix'
    - uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 #v5.0.1
      with:
        commit_message: "Auto-fix linting issues"
        branch: ${{ github.head_ref }}
        commit_options: '--signoff'
        commit_user_name: JuiceShopBot
        commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com
        commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com>
