|
31 | 31 | - name: 📥 Download deps |
32 | 32 | run: pnpm install --frozen-lockfile |
33 | 33 |
|
34 | | - # Gate only on files this PR adds/modifies (ratchet) — the repo is not |
35 | | - # fully formatted/linted yet, so a whole-repo check would fail every PR. |
36 | | - - name: 🔍 Determine changed files |
37 | | - id: changes |
38 | | - env: |
39 | | - BASE_SHA: ${{ github.event.pull_request.base.sha }} |
40 | | - run: | |
41 | | - FILES=$(git diff --name-only --diff-filter=ACMR "$BASE_SHA"...HEAD -- \ |
42 | | - '*.ts' '*.tsx' '*.js' '*.jsx' '*.mjs' '*.cjs') |
43 | | - echo "Changed code files:" |
44 | | - echo "${FILES:-<none>}" |
45 | | - { |
46 | | - echo "files<<EOF" |
47 | | - echo "$FILES" |
48 | | - echo "EOF" |
49 | | - } >> "$GITHUB_OUTPUT" |
50 | | - if [ -z "$FILES" ]; then |
51 | | - echo "has_files=false" >> "$GITHUB_OUTPUT" |
52 | | - else |
53 | | - echo "has_files=true" >> "$GITHUB_OUTPUT" |
54 | | - fi |
55 | | -
|
56 | | - # TODO enable format check for ALL code |
57 | 34 | - name: 💅 Check formatting |
58 | | - if: steps.changes.outputs.has_files == 'true' |
59 | | - env: |
60 | | - FILES: ${{ steps.changes.outputs.files }} |
61 | | - # Unquoted $FILES intentionally word-splits the newline-separated list |
62 | | - # into separate path args. Safe given the has_files guard above. |
63 | | - run: "pnpm exec oxfmt --check $FILES" |
| 35 | + run: pnpm exec oxfmt --check . |
64 | 36 |
|
65 | | - # TODO update this so lint failures fail CI |
66 | | - # Informational only — lint findings are surfaced in the logs but never |
67 | | - # fail the job. Only the formatting check above blocks the PR. |
68 | | - - name: 🔎 Lint (informational, non-blocking) |
69 | | - if: steps.changes.outputs.has_files == 'true' |
70 | | - continue-on-error: true |
71 | | - env: |
72 | | - FILES: ${{ steps.changes.outputs.files }} |
73 | | - run: "pnpm exec oxlint $FILES" |
| 37 | + - name: 🔎 Lint |
| 38 | + run: pnpm exec oxlint . |
0 commit comments