Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 6217dc8

Browse files
gkzfacebook-github-bot
authored andcommitted
Prettify files rest of non-intern files in html/
Summary: Prettify files using Prettier 1.19.1 ``` www$ ag --js -l --ignore node_modules --ignore third-party --ignore third_party --ignore html/intern/ --ignore html/js/ '\* format' html | xargs ag -L 'noformat|generated|partially-generated|lightSyntaxTransform|haste-ignore' | xargs -P 42 -n 1000 ~/www/scripts/bin/prettier --config ~/www/.prettierrc --write www$ arc rebuild ``` Manual `$FlowFixMe` placement adjustment in `html/shared/fbjs/functional/__tests__/{min,max}By-test.js` allow_many_files allow-large-files bypass-lint drop-conflicts Reviewed By: vjeux Differential Revision: D18474394 fbshipit-source-id: 45f18c78db41c3bc6d509261391d9269f0fd40ef
1 parent ae542b7 commit 6217dc8

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

src/component/utils/exploration/DraftTreeAdapter.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ const isListBlock = (block?: RawDraftContentBlock): boolean => {
4646

4747
const addDepthToChildren = (block: RawDraftContentBlock) => {
4848
if (Array.isArray(block.children)) {
49-
block.children = block.children.map(
50-
child =>
51-
child.type === block.type
52-
? {...child, depth: (block.depth || 0) + 1}
53-
: child,
49+
block.children = block.children.map(child =>
50+
child.type === block.type
51+
? {...child, depth: (block.depth || 0) + 1}
52+
: child,
5453
);
5554
}
5655
};

src/model/modifier/exploration/NestedRichTextEditorUtil.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ const NestedRichTextEditorUtil: RichTextUtils = {
122122
selection.getAnchorOffset() ||
123123
selection.getFocusOffset() ||
124124
(currentBlock.getType() === 'unstyled' &&
125-
(previousBlockKey &&
126-
content.getBlockForKey(previousBlockKey).getType() !== 'atomic'))
125+
previousBlockKey &&
126+
content.getBlockForKey(previousBlockKey).getType() !== 'atomic')
127127
) {
128128
return null;
129129
}
@@ -529,11 +529,10 @@ const onUntab = (blockMap: BlockMap, block: ContentBlockNode): BlockMap => {
529529
.toOrderedMap();
530530

531531
// set the nextChildren's parent to the new block
532-
blockMap = blockMap.map(
533-
block =>
534-
nextChildren.includes(block.getKey())
535-
? block.merge({parent: newBlock.getKey()})
536-
: block,
532+
blockMap = blockMap.map(block =>
533+
nextChildren.includes(block.getKey())
534+
? block.merge({parent: newBlock.getKey()})
535+
: block,
537536
);
538537
// update the next/previous pointers for the children at the split
539538
blockMap = blockMap

src/model/transaction/moveBlockInContentState.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ const updateBlockMapLinks = (
115115
const insertionIndex = isInsertedAfterTarget
116116
? targetBlockIndex + 1
117117
: targetBlockIndex !== 0
118-
? targetBlockIndex - 1
119-
: 0;
118+
? targetBlockIndex - 1
119+
: 0;
120120

121121
const newChildrenArray = newParentChildrenList.toArray();
122122
newChildrenArray.splice(insertionIndex, 0, originalBlockKey);

src/model/transaction/splitBlockInContentState.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@ const splitBlockInContentState = (
132132
.skipUntil(v => v === blockToSplit)
133133
.rest();
134134
let newBlocks = blocksBefore
135-
.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter)
135+
.concat(
136+
[
137+
[key, blockAbove],
138+
[keyBelow, blockBelow],
139+
],
140+
blocksAfter,
141+
)
136142
.toOrderedMap();
137143

138144
if (isExperimentalTreeBlock) {

0 commit comments

Comments
 (0)