Repository navigation
fix: replace clang-format with clang-format-node for arm64 support - #844
Merged
Merged
Conversation
The clang-format npm package only ships an x86_64 macOS binary, so it fails on Apple Silicon without Rosetta (spawn error -86). clang-format-node ships native binaries for darwin/linux arm64 and x64 and exposes the same `clang-format` bin, so scripts and lefthook stay unchanged. Reformatted the files affected by the newer clang-format (LLVM 23). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The dependency and lockfile agree, the formatter command is preserved, and the small native changes introduce no identified blocking issues.
No open issues 🎉
What changed in this PR
Replaces the formatter dependency to support native ARM64 binaries while preserving the existing clang-format command used by scripts and lefthook.
Changes:
- Switches to
clang-format-nodeand updates the lockfile. - Corrects the UIKit import capitalization.
- Applies minor formatting changes to native code without changing behavior.
| File | Description |
|---|---|
yarn.lock |
Locks the replacement formatter and removes the unused dependency entry. |
package.json |
Replaces clang-format with clang-format-node. |
ios/interfaces/AlignmentEntry.h |
Fixes UIKit header capitalization. |
ios/EnrichedTextInputView.mm |
Reformats the style-state macro. |
android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/EnrichedTextInputState.h |
Adjusts constructor spacing. |
Review effort: Balanced
szydlovsky
approved these changes
Oct 27, 2026
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 clang-format npm package only ships an x86_64 macOS binary, so it fails on Apple Silicon without Rosetta (spawn error -86). clang-format-node ships native binaries for darwin/linux arm64 and x64 and exposes the same
clang-formatbin, so scripts and lefthook stay unchanged.Test Plan
Run clang locally on MacOS 27, it should work fine.
CI is green