Skip to content

chore(ci): unblock lint for PRs#968

Open
idanlevi1 wants to merge 1 commit into
henninghall:masterfrom
idanlevi1:chore/master-lint-fix
Open

chore(ci): unblock lint for PRs#968
idanlevi1 wants to merge 1 commit into
henninghall:masterfrom
idanlevi1:chore/master-lint-fix

Conversation

@idanlevi1
Copy link
Copy Markdown

What

Two minimal CI-hygiene fixes that together unblock the lint check on every open PR:

  1. `src/DatePickerIOS.js` — apply `yarn lint --fix`. Pre-existing prettier line-wrapping issues at lines 26-27 that have been failing CI on every PR since fix: fractional seconds not supported for iso dates #894 landed (Feb 2025).
  2. `.github/workflows/lint.yml` — check out the PR head, not master. `pr.yml` is triggered by `pull_request_target`, which defaults to the base branch for both the workflow file and the checkout, so lint was running against master and PR-side fixes were invisible. The other workflows (`build-android`, `build-ios`, `test-android-*`) already use `ref: ${{ github.event.pull_request.head.sha }}` — mirroring the same pattern here.

Why

Every PR right now hits the same wall: lint job reports the prettier issue in master's `DatePickerIOS.js`, the PR has no way to fix it (workflow runs against master, not PR), and the PR is blocked. Confirmed by looking at the last ~5 master CI runs — all conclude `failure` on the lint job for unrelated reasons.

This PR breaks the chicken-and-egg by applying the trivial 2-line prettier fix on master directly and patching the workflow so future PRs can actually be linted.

Test plan

  • After merge, re-run lint on any open PR — should now check out the PR head and pass against fixed master.
  • No code behaviour changes — only a line wrap inside a JS object literal.

Two related fixes so every contributor's PR isn't blocked by an unfixable lint check:

1. `src/DatePickerIOS.js` — apply `yarn lint --fix`. Pre-existing prettier
   issues at lines 26-27 that have been failing CI on every PR for months.

2. `.github/workflows/lint.yml` — check out the PR head, not master.
   `pr.yml` is triggered by `pull_request_target`, which defaults to the
   base branch for the workflow file *and* for the checkout, so lint was
   running against master and PR-side fixes were invisible. The other
   workflows (build-android, build-ios, test-android-*) already override
   this with `ref: ${{ github.event.pull_request.head.sha }}` — mirror
   the same pattern here.

Combined, these unblock the lint check on every open PR (the existing
\`yarn lint\` rules are unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant