Update dependency prettier to v3 (#12095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
773b03e15e
commit
a0c8575113
110 changed files with 449 additions and 313 deletions
|
@ -57,7 +57,11 @@ export default class EditorModel {
|
|||
private autoCompletePartCount = 0;
|
||||
private transformCallback: TransformCallback | null = null;
|
||||
|
||||
public constructor(parts: Part[], partCreator: PartCreator, private updateCallback: UpdateCallback | null = null) {
|
||||
public constructor(
|
||||
parts: Part[],
|
||||
partCreator: PartCreator,
|
||||
private updateCallback: UpdateCallback | null = null,
|
||||
) {
|
||||
this._parts = parts;
|
||||
this._partCreator = partCreator;
|
||||
this.transformCallback = null;
|
||||
|
|
|
@ -18,7 +18,10 @@ import EditorModel from "./model";
|
|||
import DocumentPosition from "./position";
|
||||
|
||||
export default class DocumentOffset {
|
||||
public constructor(public offset: number, public readonly atNodeEnd: boolean) {}
|
||||
public constructor(
|
||||
public offset: number,
|
||||
public readonly atNodeEnd: boolean,
|
||||
) {}
|
||||
|
||||
public asPosition(model: EditorModel): DocumentPosition {
|
||||
return model.positionForOffset(this.offset, this.atNodeEnd);
|
||||
|
|
|
@ -254,7 +254,10 @@ export class PlainPart extends PlainBasePart implements IBasePart {
|
|||
}
|
||||
|
||||
export abstract class PillPart extends BasePart implements IPillPart {
|
||||
public constructor(public resourceId: string, label: string) {
|
||||
public constructor(
|
||||
public resourceId: string,
|
||||
label: string,
|
||||
) {
|
||||
super(label);
|
||||
}
|
||||
|
||||
|
@ -414,7 +417,11 @@ export class EmojiPart extends BasePart implements IBasePart {
|
|||
}
|
||||
|
||||
class RoomPillPart extends PillPart {
|
||||
public constructor(resourceId: string, label: string, private room?: Room) {
|
||||
public constructor(
|
||||
resourceId: string,
|
||||
label: string,
|
||||
private room?: Room,
|
||||
) {
|
||||
super(resourceId, label);
|
||||
}
|
||||
|
||||
|
@ -455,7 +462,11 @@ class AtRoomPillPart extends RoomPillPart {
|
|||
}
|
||||
|
||||
class UserPillPart extends PillPart {
|
||||
public constructor(userId: string, displayName: string, private member?: RoomMember) {
|
||||
public constructor(
|
||||
userId: string,
|
||||
displayName: string,
|
||||
private member?: RoomMember,
|
||||
) {
|
||||
super(userId, displayName);
|
||||
}
|
||||
|
||||
|
@ -490,7 +501,10 @@ class UserPillPart extends PillPart {
|
|||
}
|
||||
|
||||
class PillCandidatePart extends PlainBasePart implements IPillCandidatePart {
|
||||
public constructor(text: string, private autoCompleteCreator: IAutocompleteCreator) {
|
||||
public constructor(
|
||||
text: string,
|
||||
private autoCompleteCreator: IAutocompleteCreator,
|
||||
) {
|
||||
super(text);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,10 @@ type Callback = (part: Part, startIdx: number, endIdx: number) => void;
|
|||
export type Predicate = (index: number, offset: number, part: Part) => boolean;
|
||||
|
||||
export default class DocumentPosition implements IPosition {
|
||||
public constructor(public readonly index: number, public readonly offset: number) {}
|
||||
public constructor(
|
||||
public readonly index: number,
|
||||
public readonly offset: number,
|
||||
) {}
|
||||
|
||||
public compare(otherPos: DocumentPosition): number {
|
||||
if (this.index === otherPos.index) {
|
||||
|
|
|
@ -28,7 +28,11 @@ export default class Range {
|
|||
private _lastStart: DocumentPosition;
|
||||
private _initializedEmpty: boolean;
|
||||
|
||||
public constructor(public readonly model: EditorModel, positionA: DocumentPosition, positionB = positionA) {
|
||||
public constructor(
|
||||
public readonly model: EditorModel,
|
||||
positionA: DocumentPosition,
|
||||
positionB = positionA,
|
||||
) {
|
||||
const bIsLarger = positionA.compare(positionB) < 0;
|
||||
this._start = bIsLarger ? positionA : positionB;
|
||||
this._end = bIsLarger ? positionB : positionA;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue