fix: resolve ESM exports for codepress-browser-extension #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ESLint Autofix | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| concurrency: | ||
| group: eslint-autofix-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| eslint-autofix: | ||
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: true | ||
| - name: Setup PNPM | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| cache: pnpm | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Run ESLint with autofix | ||
| run: pnpm exec eslint . --fix || true | ||
| - name: Commit and push changes (if any) | ||
| if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }} | ||
| uses: stefanzweifel/git-auto-commit-action@v5 | ||
| with: | ||
| commit_message: chore: eslint autofix [skip ci] | ||
| branch: ${{ github.head_ref }} | ||
| commit_user_name: github-actions[bot] | ||
| commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
| - name: Verify ESLint passes | ||
| run: pnpm exec eslint . | ||