Repository navigation
fix(iOS): fix Prettier lint failure after SwiftPM support landed - #57564
Closed
cipolleschi wants to merge 1 commit into
Closed
cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
The Flow comment-type annotation on the uninitialized `let tmp` was reformatted by Prettier (moving the comment past the semicolon and detaching the annotation), which broke the lint job's format-check step. Giving `tmp` an initializer keeps the `/*: string */` annotation inline and satisfies Prettier.
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D112114604. |
chrfalch
approved these changes
Jul 15, 2026
cortinico
approved these changes
Jul 15, 2026
cortinico
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
@cipolleschi merged this pull request in a693f41. |
cipolleschi
added a commit
that referenced
this pull request
Jul 16, 2026
tvinhas
pushed a commit
to tvinhas/react-native-macos
that referenced
this pull request
Oct 21, 2026
…ct#57564) Summary: The OSS lint job went red after the SwiftPM stack landed (react#57332 and its base PRs). The failing signal is the **Prettier** step of the `lint` job. The offending file (introduced in base PR react#57442) is: `packages/react-native/scripts/ios-prebuild/__tests__/headers-xcframework-test.js` ```js let tmp /*: string */; ``` This is a Flow *comment-type annotation* on an **uninitialized** `let`. Prettier reformats an uninitialized declaration by moving the trailing comment past the semicolon: ```js let tmp; /*: string */ // annotation detached — no longer a type annotation ``` Because CI runs `prettier --list-different` (fails on any diff), this made the lint job fail. Prettier only keeps the `/*: string */` annotation inline when the declaration has an initializer, so the fix is to give `tmp` one: ```js let tmp /*: string */ = ''; ``` Semantically safe — `tmp` is assigned in `beforeEach` before any use. ## Changelog: [INTERNAL] [FIXED] - Fix Prettier lint failure in `headers-xcframework` test Pull Request resolved: react#57564 Test Plan: - `yarn format-check` — clean across the repo - `yarn lint` (ESLint) — passes - `yarn lint-markdown` — passes - `yarn test-typescript-legacy` — passes - Jest `headers-xcframework-test.js` — all 5 tests pass Reviewed By: cortinico, fabriziocucci Differential Revision: D112114604 Pulled By: cipolleschi fbshipit-source-id: 9f2d116eae0cf5581cf0e1a1e79c0c3b28f7c176
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OSS lint job went red after the SwiftPM stack landed (#57332 and its base PRs). The failing signal is the Prettier step of the
lintjob.The offending file (introduced in base PR #57442) is:
packages/react-native/scripts/ios-prebuild/__tests__/headers-xcframework-test.jsThis is a Flow comment-type annotation on an uninitialized
let. Prettier reformats an uninitialized declaration by moving the trailing comment past the semicolon:Because CI runs
prettier --list-different(fails on any diff), this made the lint job fail. Prettier only keeps the/*: string */annotation inline when the declaration has an initializer, so the fix is to givetmpone:Semantically safe —
tmpis assigned inbeforeEachbefore any use.Changelog:
[INTERNAL] [FIXED] - Fix Prettier lint failure in
headers-xcframeworktestTest Plan
yarn format-check— clean across the repoyarn lint(ESLint) — passesyarn lint-markdown— passesyarn test-typescript-legacy— passesheaders-xcframework-test.js— all 5 tests pass