Skip to content

Commit 1c79fd5

Browse files
marcoww6meta-codesync[bot]
authored andcommitted
switch to hermes for eslint-plugin-specs (facebook#56023)
Summary: Pull Request resolved: facebook#56023 Switch js/react-native-github/packages/eslint-plugin-specs/package.json to use hermes instead of babel Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D95867106 fbshipit-source-id: 422d6fbb939cd0067731024d6181523cc471bab6
1 parent 64a1a10 commit 1c79fd5

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

packages/eslint-plugin-specs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"@react-native/codegen": "0.86.0-main",
3030
"make-dir": "^2.1.0",
3131
"pirates": "^4.0.1",
32+
"babel-plugin-syntax-hermes-parser": "0.33.3",
3233
"source-map-support": "0.5.0"
3334
},
3435
"devDependencies": {
35-
"babel-plugin-syntax-hermes-parser": "0.33.3",
3636
"hermes-eslint": "0.33.3"
3737
},
3838
"engines": {

packages/eslint-plugin-specs/react-native-modules.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ function requireModuleParser() {
3232
// If using this externally, we leverage @react-native/codegen as published form
3333
if (!PACKAGE_USAGE) {
3434
const config = {
35+
babelrc: false,
36+
configFile: false,
3537
only: [/react-native-codegen\/src\//],
36-
plugins: [require('@babel/plugin-transform-flow-strip-types').default],
38+
plugins: [
39+
require('babel-plugin-syntax-hermes-parser'),
40+
require('@babel/plugin-transform-flow-strip-types').default,
41+
],
3742
};
3843

3944
withBabelRegister(config, () => {
@@ -45,8 +50,13 @@ function requireModuleParser() {
4550
});
4651
} else {
4752
const config = {
53+
babelrc: false,
54+
configFile: false,
4855
only: [/@react-native\/codegen\/lib\//],
49-
plugins: [require('@babel/plugin-transform-flow-strip-types').default],
56+
plugins: [
57+
require('babel-plugin-syntax-hermes-parser'),
58+
require('@babel/plugin-transform-flow-strip-types').default,
59+
],
5060
};
5161

5262
withBabelRegister(config, () => {

0 commit comments

Comments
 (0)