Skip to content

Commit 4f1686f

Browse files
committed
test switching back to flow parser
1 parent 4a1f290 commit 4f1686f

File tree

8 files changed

+7
-32
lines changed

8 files changed

+7
-32
lines changed

.prettierrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
const {esNextPaths} = require('./scripts/shared/pathsByLanguageVersion');
44

55
module.exports = {
6-
plugins: ['prettier-plugin-hermes-parser'],
76
bracketSpacing: false,
87
singleQuote: true,
98
bracketSameLine: true,
109
trailingComma: 'es5',
1110
printWidth: 80,
12-
parser: 'hermes',
11+
parser: 'flow',
1312
arrowParens: 'avoid',
1413
overrides: [
1514
{

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/ternary-expression.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function ternary(props) {
2-
const a = props.a && props.b ? props.c || props.d : props.e ?? props.f;
2+
const a = props.a && props.b ? props.c || props.d : (props.e ?? props.f);
33
const b = props.a ? (props.b && props.c ? props.d : props.e) : props.f;
44
return a ? b : null;
55
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"ncp": "^2.0.0",
9292
"prettier": "^3.3.3",
9393
"prettier-2": "npm:prettier@^2",
94-
"prettier-plugin-hermes-parser": "^0.23.0",
9594
"pretty-format": "^29.4.1",
9695
"prop-types": "^15.6.2",
9796
"random-seed": "^0.3.0",

packages/react-devtools-shared/src/devtools/ContextMenu/types.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type ContextMenuHandle = {
2525
hide(): void,
2626
};
2727

28-
/*::
29-
export type ContextMenuComponent = component(ref: React$RefSetter<ContextMenuHandle>);
30-
*/
28+
export type ContextMenuComponent = component(
29+
ref: React$RefSetter<ContextMenuHandle>,
30+
);
3131
export type ContextMenuRef = {current: ContextMenuHandle | null};

packages/react-devtools-shared/src/hooks/astUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function getHookVariableName(
289289
const nodeType = hook.node.id.type;
290290
switch (nodeType) {
291291
case AST_NODE_TYPES.ARRAY_PATTERN:
292-
return !isCustomHook ? hook.node.id.elements[0]?.name ?? null : null;
292+
return !isCustomHook ? (hook.node.id.elements[0]?.name ?? null) : null;
293293

294294
case AST_NODE_TYPES.IDENTIFIER:
295295
return hook.node.id.name;

packages/react-noop-renderer/src/createReactNoop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function createReactNoop(reconciler: Function, useMutation: boolean) {
253253
id: instance.id,
254254
type: type,
255255
parent: instance.parent,
256-
children: keepChildren ? instance.children : children ?? [],
256+
children: keepChildren ? instance.children : (children ?? []),
257257
text: shouldSetTextContent(type, newProps)
258258
? computeText((newProps.children: any) + '', instance.context)
259259
: null,

scripts/flow/config/flowconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
.*/__mocks__/.*
1515
.*/__tests__/.*
1616

17-
# contains modern flow syntax that requires a Flow upgrade
18-
.*/node_modules/prettier-plugin-hermes-parser/.*
1917

2018
# TODO: noop should get its own inlinedHostConfig entry
2119
.*/packages/react-noop-renderer/.*

yarn.lock

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9975,11 +9975,6 @@ hermes-eslint@^0.25.1:
99759975
hermes-estree "0.25.1"
99769976
hermes-parser "0.25.1"
99779977

9978-
hermes-estree@0.23.0:
9979-
version "0.23.0"
9980-
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.23.0.tgz#89c5419877b9d6bce4bb616821f496f5c5daddbc"
9981-
integrity sha512-Rkp0PNLGpORw4ktsttkVbpYJbrYKS3hAnkxu8D9nvQi6LvSbuPa+tYw/t2u3Gjc35lYd/k95YkjqyTcN4zspag==
9982-
99839978
hermes-estree@0.23.1:
99849979
version "0.23.1"
99859980
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.23.1.tgz#d0bac369a030188120ee7024926aabe5a9f84fdb"
@@ -9990,13 +9985,6 @@ hermes-estree@0.25.1:
99909985
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.25.1.tgz#6aeec17d1983b4eabf69721f3aa3eb705b17f480"
99919986
integrity sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==
99929987

9993-
hermes-parser@0.23.0:
9994-
version "0.23.0"
9995-
resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.23.0.tgz#3541907b77ca9e94fd093e8ef0ff97ca5340dee8"
9996-
integrity sha512-xLwM4ylfHGwrm+2qXfO1JT/fnqEDGSnpS/9hQ4VLtqTexSviu2ZpBgz07U8jVtndq67qdb/ps0qvaWDZ3fkTyg==
9997-
dependencies:
9998-
hermes-estree "0.23.0"
9999-
100009988
hermes-parser@0.23.1:
100019989
version "0.23.1"
100029990
resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.23.1.tgz#e5de648e664f3b3d84d01b48fc7ab164f4b68205"
@@ -14088,15 +14076,6 @@ prepend-http@^2.0.0:
1408814076
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
1408914077
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
1409014078

14091-
prettier-plugin-hermes-parser@0.23.0, prettier-plugin-hermes-parser@^0.23.0:
14092-
version "0.23.0"
14093-
resolved "https://registry.yarnpkg.com/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.23.0.tgz#67fa061e503600087169283e150bc3f3239bf39c"
14094-
integrity sha512-EMwgZFcKDyVfUCvIy/kxVc4siYEOYPt7lLqtaELVadKYNbOLUFjYW3QKGZ8jzidUy4DonfFbi/hJOXJ5vfRzxA==
14095-
dependencies:
14096-
hermes-estree "0.23.0"
14097-
hermes-parser "0.23.0"
14098-
prettier-plugin-hermes-parser "0.23.0"
14099-
1410014079
prettier@*, prettier@^3.3.3:
1410114080
version "3.3.3"
1410214081
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"

0 commit comments

Comments
 (0)