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 |
 |
 |
| ❌ Fails to parse |
✅ Reads project Babel config, parses with @babel/plugin-proposal-decorators |
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|.jsxfiles under ESLint in user code.@babel/eslint-parserwill respect a localbabel.config.jsfile (Babel pipeline), instead of the hermes-parser pipeline.Changelog:
[General][Fixed] - Update
@react-native/babel-presetto 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.@babel/plugin-proposal-decorators