Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to hermes-parser in eslint-config #46700

Closed
wants to merge 3 commits into from

Conversation

huntie
Copy link
Member

@huntie huntie commented Sep 27, 2024

Summary:
Similar to D63541483, modernises our Flow syntax support for our published ESLint config to use hermes-eslint (hermes-parser).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D63541856

Alex Hunt added 2 commits September 27, 2024 07:49
Summary:
Switch from legacy Babel Flow parser integrations to the Meta-maintained `hermes-eslint` and `babel-plugin-syntax-hermes-parser` packages (both part of the `hermes-parser` codebase).

Required to unblock D63535216.

Changelog: [Internal]

Differential Revision: D63541483
Summary:
Following D62161923, we began to lose sync with modern Flow syntax when Metro's `transformer.hermesParser` option is disabled. This config option loads Babel for transformation (instead of `hermes-parser`), which requires a Babel plugin to parse (not strip) Flow syntax.

This diff migratess us away from `babel/plugin-syntax-flow` (see also babel/babel#16264) and uses the modern [`babel-plugin-syntax-hermes-parser`](https://www.npmjs.com/package/babel-plugin-syntax-hermes-parser) instead (a component of the modern Hermes Parser stack).

Following this change, new projects that unset `transformer.hermesParser` will compile.

Resolves facebook#46601.

Changelog:
[General][Fixed] - Fix parsing of modern Flow syntax when `transformer.hermesParser = false` is configured in Metro config

Differential Revision: D63535216
@facebook-github-bot facebook-github-bot added 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 labels Sep 27, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63541856

Summary:
Pull Request resolved: facebook#46700

Similar to D63541483, modernises our Flow syntax support for our published ESLint config to use `hermes-eslint` (`hermes-parser`).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D63541856
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D63541856

@blakef blakef closed this Sep 30, 2024
@huntie huntie deleted the export-D63541856 branch January 30, 2025 09:42
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. fb-exported p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants