Skip to content

[0.76] Revert to @babel/eslint-parser in eslint-config #629

Description

@huntie

Target Branch(es)

0.76

Link to commit or PR to be picked

react/react-native#47333

Description

Paired change with react/react-native#47569 (already merged).

This will restore the pre-0.76.0 behaviour of .js|.jsx files under ESLint in user code. @babel/eslint-parser will respect a local babel.config.js file (Babel pipeline), instead of the hermes-parser pipeline.

Changelog:
[General][Fixed] - Update @react-native/babel-preset to use @babel/eslint-parser, fixing compatibility with customised Babel configs (pre-0.76.0 behaviour)

Test plan

See react/react-native#47569 for context and setup.

Changes to babel.config.js (in this example, adding @babel/plugin-proposal-decorators) will now be used by ESLint.

Before After
image image
❌ Fails to parse ✅ Reads project Babel config, parses with @babel/plugin-proposal-decorators

Metadata

Metadata

Assignees

Labels

Type Pick RequestPick requests to include commits inside a React Native release

Type

No type

Projects

Status
Done / Picked

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions