Skip to content

Commit 15a7024

Browse files
committed
style(json-crdt-extensions): 💄 run Prettier
1 parent 30caaa4 commit 15a7024

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/json-crdt-extensions/peritext/point/Point.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {StringChunk} from '../util/types';
1515
* points just after the character. Points attached to string characters are
1616
* referred to as *relative* points, while points attached to the beginning or
1717
* end of the string are referred to as *absolute* points.
18-
*
18+
*
1919
* The *absolute* points are reference the string itself, by using the string's
2020
* ID as the character ID. The *absolute (abs) start* references the very start
2121
* of the string, before the first character, and even before any deleted
@@ -81,14 +81,10 @@ export class Point implements Pick<Stateful, 'refresh'>, Printable {
8181
const otherId = other.id;
8282
if (this.isAbs()) {
8383
const isStart = this.anchor === Anchor.After;
84-
return isStart
85-
? other.isAbsStart() ? 0 : -1
86-
: other.isAbsEnd() ? 0 : 1;
84+
return isStart ? (other.isAbsStart() ? 0 : -1) : other.isAbsEnd() ? 0 : 1;
8785
} else if (other.isAbs()) {
8886
const isStart = other.anchor === Anchor.After;
89-
return isStart
90-
? this.isAbsStart() ? 0 : 1
91-
: this.isAbsEnd() ? 0 : -1;
87+
return isStart ? (this.isAbsStart() ? 0 : 1) : this.isAbsEnd() ? 0 : -1;
9288
}
9389
const cmp0 = compare(thisId, otherId);
9490
if (!cmp0) return this.anchor - other.anchor;

src/json-crdt-extensions/peritext/slice/Cursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class Cursor extends Range implements Slice {
1515
* the end which does not move when user changes selection. The other
1616
* end is free to move, the moving end of the cursor is "focus". By default
1717
* "anchor" is the start of the cursor.
18-
*
18+
*
1919
* @todo Create a custom enum for this, instead of using `Anchor`.
2020
*/
2121
public base: Anchor = Anchor.Before;

0 commit comments

Comments
 (0)