Files
InfiniteAPI/.github/workflows/lint.yml
T
Renato Alcara b3ecba131d fix(ci): add auto-fix step to lint workflow and fix circular rule conflict
- Add `yarn lint:fix` step before lint check to auto-fix prettier/import-sort
  formatting issues (runs with continue-on-error to not block)
- Fix circular conflict between prettier and space-before-function-paren
  rule in cache-utils.ts via eslint-disable comment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 21:59:51 -03:00

59 lines
1.6 KiB
YAML

name: Linting Check
on:
push:
branches:
- master
pull_request:
jobs:
check-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Setup Node and Corepack
uses: actions/setup-node@v3.6.0
with:
node-version: 20.x
- name: Enable Corepack and Set Yarn Version
run: |
corepack enable
corepack prepare yarn@4.x --activate
- name: Configure Git for HTTPS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Force git to use HTTPS with token instead of SSH for GitHub repositories
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "ssh://git@github.com/"
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "git@github.com:"
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Restore Yarn Cache
uses: actions/cache@v4
id: yarn-cache
with:
path: |
node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_TERMINAL_PROMPT: 0
run: yarn install --immutable
- name: Auto-fix formatting
run: yarn lint:fix
continue-on-error: true
- name: Check linting
run: yarn lint