Match xplat/yoga/javascript prettier conventions

Summary:
Match Prettier config to match other Meta OSS projects

Didn't update the test generator to use this form yet.

Reviewed By: yungsters

Differential Revision: D45570415

fbshipit-source-id: d5fd791b047debf41c28aecac75fb8dde16da3e3
This commit is contained in:
Nick Gerleman
2023-05-09 15:35:42 -07:00
committed by Facebook GitHub Bot
parent 0cb4a49d38
commit 0a6a581936
29 changed files with 197 additions and 199 deletions

View File

@@ -5,9 +5,9 @@
* LICENSE file in the root directory of this source tree.
*/
import { Yoga } from "./tools/globals";
import {Yoga} from './tools/globals';
test("dirtied", () => {
test('dirtied', () => {
const root = Yoga.Node.create();
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
@@ -21,7 +21,7 @@ test("dirtied", () => {
});
// only nodes with a measure function can be marked dirty
root.setMeasureFunc(() => ({ width: 0, height: 0 }));
root.setMeasureFunc(() => ({width: 0, height: 0}));
expect(dirtied).toBe(0);
@@ -36,7 +36,7 @@ test("dirtied", () => {
root.freeRecursive();
});
test("dirtied_propagation", () => {
test('dirtied_propagation', () => {
const root = Yoga.Node.create();
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
@@ -46,7 +46,7 @@ test("dirtied_propagation", () => {
root_child0.setAlignItems(Yoga.ALIGN_FLEX_START);
root_child0.setWidth(50);
root_child0.setHeight(20);
root_child0.setMeasureFunc(() => ({ width: 0, height: 0 }));
root_child0.setMeasureFunc(() => ({width: 0, height: 0}));
root.insertChild(root_child0, 0);
const root_child1 = Yoga.Node.create();
@@ -75,7 +75,7 @@ test("dirtied_propagation", () => {
root.freeRecursive();
});
test("dirtied_hierarchy", () => {
test('dirtied_hierarchy', () => {
const root = Yoga.Node.create();
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
@@ -85,14 +85,14 @@ test("dirtied_hierarchy", () => {
root_child0.setAlignItems(Yoga.ALIGN_FLEX_START);
root_child0.setWidth(50);
root_child0.setHeight(20);
root_child0.setMeasureFunc(() => ({ width: 0, height: 0 }));
root_child0.setMeasureFunc(() => ({width: 0, height: 0}));
root.insertChild(root_child0, 0);
const root_child1 = Yoga.Node.create();
root_child1.setAlignItems(Yoga.ALIGN_FLEX_START);
root_child1.setWidth(50);
root_child1.setHeight(20);
root_child0.setMeasureFunc(() => ({ width: 0, height: 0 }));
root_child0.setMeasureFunc(() => ({width: 0, height: 0}));
root.insertChild(root_child1, 0);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
@@ -118,12 +118,12 @@ test("dirtied_hierarchy", () => {
root.freeRecursive();
});
test("dirtied_reset", () => {
test('dirtied_reset', () => {
const root = Yoga.Node.create();
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
root.setMeasureFunc(() => ({ width: 0, height: 0 }));
root.setMeasureFunc(() => ({width: 0, height: 0}));
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
@@ -145,7 +145,7 @@ test("dirtied_reset", () => {
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
root.setMeasureFunc(() => ({ width: 0, height: 0 }));
root.setMeasureFunc(() => ({width: 0, height: 0}));
root.markDirty();