Skip to content

[RN] Make yarn the source of truth for JS lint/format - #57784

Draft
mattcarrollcode wants to merge 2 commits into
mainfrom
rn-yarn-lint
Draft

[RN] Make yarn the source of truth for JS lint/format#57784
mattcarrollcode wants to merge 2 commits into
mainfrom
rn-yarn-lint

Conversation

@mattcarrollcode

Copy link
Copy Markdown

Summary

Point synced JavaScript formatting and linting at the repository's own Prettier +
ESLint so CI is the source of truth: add yarn f (Prettier), expand the Prettier
globs to all JS-family extensions, and make the CI ESLint step propagate its exit
status instead of swallowing it.

Changelog

[Internal]

Test Plan

yarn lint, yarn format-check, and yarn f run from the repo root; the GitHub
lint job runs both on this PR.

Changelog: [Internal]

## Summary
Point synced JavaScript formatting and linting at the repository's own Prettier +
ESLint so CI is the source of truth: add `yarn f` (Prettier), expand the Prettier
globs to all JS-family extensions, and make the CI ESLint step propagate its exit
status instead of swallowing it.

## Changelog
[Internal]

## Test Plan
`yarn lint`, `yarn format-check`, and `yarn f` run from the repo root; the GitHub
`lint` job runs both on this PR.

Changelog: [Internal]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 1, 2026
@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Aug 1, 2026
@mattcarrollcode
mattcarrollcode force-pushed the rn-yarn-lint branch 2 times, most recently from e5a91e4 to 8daed7a Compare August 4, 2026 19:25
## Summary
Extend yarn-owned formatting to every synced non-JS language so GitHub CI is the
single source of truth and internal (Meta) + GitHub produce byte-identical
output, using the OSS toolchain:

- `scripts/lint/clang-format.sh` — clang-format `21.1.2` (C/C++/Obj-C).
- `scripts/lint/ktfmt.sh` — ktfmt `0.64` (Kotlin `.kt` and `.kts`).
- `scripts/lint/google-java-format.sh` — google-java-format `1.23.0` (Java).
- `scripts/lint/pyfmt.sh` — ufmt (`ruff-api` formatter + `usort`), configured in
  `pyproject.toml` (Python).
- `yarn f` runs Prettier + all four; each has a `-check` variant. The CI `lint`
  job runs all of them (JDK 17 via setup-java for ktfmt/google-java-format;
  Python provisions ufmt from PyPI).
- Reformats: 78 Kotlin `.kt` + 2 `.kts` to ktfmt `0.64`. C/C++/Obj-C, Java, and
  Python are already clean under the matching OSS releases, so no reformat there.

## Changelog
[Internal]

## Test Plan
`yarn clang-format-check`, `yarn lint-kotlin-check`, `yarn lint-java-check`
(JDK 17), and `yarn lint-python-check` all clean on the synced tree; `yarn f`
formats JS + native + Python. The GitHub `lint` job runs all checks on this PR.

Changelog: [Internal]
@mattcarrollcode
mattcarrollcode force-pushed the rn-yarn-lint branch 2 times, most recently from 8daed7a to 060c402 Compare August 4, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant