Skip to content

Commit a6a9023

Browse files
committed
Lint fixes
1 parent ffca529 commit a6a9023

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

app/assets/javascript/lexxy.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6786,7 +6786,7 @@ class Selection {
67866786
#getCursorBlockMetrics() {
67876787
const nativeSelection = window.getSelection();
67886788
if (!nativeSelection || nativeSelection.rangeCount === 0) {
6789-
return null;
6789+
return null
67906790
}
67916791

67926792
const range = nativeSelection.getRangeAt(0);
@@ -6796,7 +6796,7 @@ class Selection {
67966796
this.editor.getEditorState().read(() => {
67976797
const selection = Lr();
67986798
if (!yr(selection)) {
6799-
return;
6799+
return
68006800
}
68016801

68026802
const anchorNode = selection.anchor.getNode();
@@ -6807,20 +6807,20 @@ class Selection {
68076807
});
68086808

68096809
if (!blockElement) {
6810-
return null;
6810+
return null
68116811
}
68126812

68136813
const blockRect = blockElement.getBoundingClientRect();
68146814
const lineHeight = this.#getLineHeight(blockElement);
68156815

6816-
return { cursorRect, blockRect, lineHeight };
6816+
return { cursorRect, blockRect, lineHeight }
68176817
}
68186818

68196819
#getLineHeight(element) {
68206820
const computed = window.getComputedStyle(element);
68216821
const lineHeight = computed.lineHeight;
68226822

6823-
if (lineHeight === 'normal') {
6823+
if (lineHeight === "normal") {
68246824
return parseFloat(computed.fontSize)
68256825
}
68266826

@@ -7129,7 +7129,7 @@ class Selection {
71297129

71307130
return null
71317131
}
7132-
7132+
71337133
#findLastDecoratorDescendant(node) {
71347134
if (node instanceof ki) {
71357135
return node
@@ -7806,7 +7806,7 @@ class Contents {
78067806
if (Ii(followingNode) && this.#isElementEmpty(followingNode)) {
78077807
followingNode.remove();
78087808
}
7809-
7809+
78107810
focusNode = this.#findAdjacentNodeTo(nodesToRemove);
78117811
this.#deleteNodes(nodesToRemove);
78127812
}

app/assets/javascript/lexxy.js.br

-54 Bytes
Binary file not shown.

app/assets/javascript/lexxy.js.gz

-10 Bytes
Binary file not shown.

src/editor/contents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export default class Contents {
293293
if ($isParagraphNode(followingNode) && this.#isElementEmpty(followingNode)) {
294294
followingNode.remove()
295295
}
296-
296+
297297
focusNode = this.#findAdjacentNodeTo(nodesToRemove)
298298
this.#deleteNodes(nodesToRemove)
299299
}

src/editor/selection.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -429,43 +429,43 @@ export default class Selection {
429429
}
430430

431431
#getCursorBlockMetrics() {
432-
const nativeSelection = window.getSelection();
432+
const nativeSelection = window.getSelection()
433433
if (!nativeSelection || nativeSelection.rangeCount === 0) {
434-
return null;
434+
return null
435435
}
436436

437-
const range = nativeSelection.getRangeAt(0);
438-
const cursorRect = range.getBoundingClientRect();
437+
const range = nativeSelection.getRangeAt(0)
438+
const cursorRect = range.getBoundingClientRect()
439439

440-
let blockElement = null;
440+
let blockElement = null
441441
this.editor.getEditorState().read(() => {
442-
const selection = $getSelection();
442+
const selection = $getSelection()
443443
if (!$isRangeSelection(selection)) {
444-
return;
444+
return
445445
}
446446

447-
const anchorNode = selection.anchor.getNode();
448-
const topLevelElement = anchorNode.getTopLevelElement();
447+
const anchorNode = selection.anchor.getNode()
448+
const topLevelElement = anchorNode.getTopLevelElement()
449449
if (topLevelElement) {
450-
blockElement = this.editor.getElementByKey(topLevelElement.getKey());
450+
blockElement = this.editor.getElementByKey(topLevelElement.getKey())
451451
}
452-
});
452+
})
453453

454454
if (!blockElement) {
455-
return null;
455+
return null
456456
}
457457

458-
const blockRect = blockElement.getBoundingClientRect();
459-
const lineHeight = this.#getLineHeight(blockElement);
458+
const blockRect = blockElement.getBoundingClientRect()
459+
const lineHeight = this.#getLineHeight(blockElement)
460460

461-
return { cursorRect, blockRect, lineHeight };
461+
return { cursorRect, blockRect, lineHeight }
462462
}
463463

464464
#getLineHeight(element) {
465465
const computed = window.getComputedStyle(element)
466466
const lineHeight = computed.lineHeight
467467

468-
if (lineHeight === 'normal') {
468+
if (lineHeight === "normal") {
469469
return parseFloat(computed.fontSize)
470470
}
471471

@@ -774,7 +774,7 @@ export default class Selection {
774774

775775
return null
776776
}
777-
777+
778778
#findLastDecoratorDescendant(node) {
779779
if (node instanceof DecoratorNode) {
780780
return node

0 commit comments

Comments
 (0)