Enable @typescript-eslint/explicit-member-accessibility on /src (#9785)

* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
This commit is contained in:
Michael Telatynski
2022-12-16 12:29:59 +00:00
committed by GitHub
parent 51554399fb
commit f1e8e7f140
396 changed files with 1110 additions and 1098 deletions

View File

@@ -34,7 +34,7 @@ export type UpdateQuery = (test: string) => Promise<void>;
export default class AutocompleteWrapperModel {
private partIndex: number;
constructor(
public constructor(
private updateCallback: UpdateCallback,
private getAutocompleterComponent: GetAutocompleterComponent,
private updateQuery: UpdateQuery,

View File

@@ -57,7 +57,7 @@ export default class EditorModel {
private autoCompletePartCount = 0;
private transformCallback: TransformCallback = null;
constructor(parts: Part[], partCreator: PartCreator, private updateCallback: UpdateCallback = null) {
public constructor(parts: Part[], partCreator: PartCreator, private updateCallback: UpdateCallback = null) {
this._parts = parts;
this._partCreator = partCreator;
this.transformCallback = null;

View File

@@ -18,7 +18,7 @@ import EditorModel from "./model";
import DocumentPosition from "./position";
export default class DocumentOffset {
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);

View File

@@ -85,7 +85,7 @@ export type Part = IBasePart | IPillCandidatePart | IPillPart;
abstract class BasePart {
protected _text: string;
constructor(text = "") {
public constructor(text = "") {
this._text = text;
}
@@ -248,7 +248,7 @@ export class PlainPart extends PlainBasePart implements IBasePart {
}
export abstract class PillPart extends BasePart implements IPillPart {
constructor(public resourceId: string, label) {
public constructor(public resourceId: string, label) {
super(label);
}
@@ -408,7 +408,7 @@ export class EmojiPart extends BasePart implements IBasePart {
}
class RoomPillPart extends PillPart {
constructor(resourceId: string, label: string, private room?: Room) {
public constructor(resourceId: string, label: string, private room?: Room) {
super(resourceId, label);
}
@@ -432,7 +432,7 @@ class RoomPillPart extends PillPart {
}
class AtRoomPillPart extends RoomPillPart {
constructor(text: string, room: Room) {
public constructor(text: string, room: Room) {
super(text, text, room);
}
@@ -449,7 +449,7 @@ class AtRoomPillPart extends RoomPillPart {
}
class UserPillPart extends PillPart {
constructor(userId, displayName, private member: RoomMember) {
public constructor(userId, displayName, private member: RoomMember) {
super(userId, displayName);
}
@@ -484,7 +484,7 @@ class UserPillPart extends PillPart {
}
class PillCandidatePart extends PlainBasePart implements IPillCandidatePart {
constructor(text: string, private autoCompleteCreator: IAutocompleteCreator) {
public constructor(text: string, private autoCompleteCreator: IAutocompleteCreator) {
super(text);
}
@@ -508,7 +508,7 @@ class PillCandidatePart extends PlainBasePart implements IPillCandidatePart {
return true;
}
get type(): IPillCandidatePart["type"] {
public get type(): IPillCandidatePart["type"] {
return Type.PillCandidate;
}
}
@@ -530,7 +530,7 @@ interface IAutocompleteCreator {
export class PartCreator {
protected readonly autoCompleteCreator: IAutocompleteCreator;
constructor(
public constructor(
private readonly room: Room,
private readonly client: MatrixClient,
autoCompleteCreator: AutoCompleteCreator = null,

View File

@@ -27,7 +27,7 @@ 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 {
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) {

View File

@@ -28,7 +28,7 @@ export default class Range {
private _lastStart: DocumentPosition;
private _initializedEmpty: boolean;
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;