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

Commit

Permalink
Prettify files rest of non-intern files in html/
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gkz authored and facebook-github-bot committed Nov 13, 2019
1 parent ae542b7 commit 6217dc8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
9 changes: 4 additions & 5 deletions src/component/utils/exploration/DraftTreeAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ const isListBlock = (block?: RawDraftContentBlock): boolean => {

const addDepthToChildren = (block: RawDraftContentBlock) => {
if (Array.isArray(block.children)) {
block.children = block.children.map(
child =>
child.type === block.type
? {...child, depth: (block.depth || 0) + 1}
: child,
block.children = block.children.map(child =>
child.type === block.type
? {...child, depth: (block.depth || 0) + 1}
: child,
);
}
};
Expand Down
13 changes: 6 additions & 7 deletions src/model/modifier/exploration/NestedRichTextEditorUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ const NestedRichTextEditorUtil: RichTextUtils = {
selection.getAnchorOffset() ||
selection.getFocusOffset() ||
(currentBlock.getType() === 'unstyled' &&
(previousBlockKey &&
content.getBlockForKey(previousBlockKey).getType() !== 'atomic'))
previousBlockKey &&
content.getBlockForKey(previousBlockKey).getType() !== 'atomic')
) {
return null;
}
Expand Down Expand Up @@ -529,11 +529,10 @@ const onUntab = (blockMap: BlockMap, block: ContentBlockNode): BlockMap => {
.toOrderedMap();

// set the nextChildren's parent to the new block
blockMap = blockMap.map(
block =>
nextChildren.includes(block.getKey())
? block.merge({parent: newBlock.getKey()})
: block,
blockMap = blockMap.map(block =>
nextChildren.includes(block.getKey())
? block.merge({parent: newBlock.getKey()})
: block,
);
// update the next/previous pointers for the children at the split
blockMap = blockMap
Expand Down
4 changes: 2 additions & 2 deletions src/model/transaction/moveBlockInContentState.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ const updateBlockMapLinks = (
const insertionIndex = isInsertedAfterTarget
? targetBlockIndex + 1
: targetBlockIndex !== 0
? targetBlockIndex - 1
: 0;
? targetBlockIndex - 1
: 0;

const newChildrenArray = newParentChildrenList.toArray();
newChildrenArray.splice(insertionIndex, 0, originalBlockKey);
Expand Down
8 changes: 7 additions & 1 deletion src/model/transaction/splitBlockInContentState.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,13 @@ const splitBlockInContentState = (
.skipUntil(v => v === blockToSplit)
.rest();
let newBlocks = blocksBefore
.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter)
.concat(
[
[key, blockAbove],
[keyBelow, blockBelow],
],
blocksAfter,
)
.toOrderedMap();

if (isExperimentalTreeBlock) {
Expand Down

0 comments on commit 6217dc8

Please sign in to comment.