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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
396 changed files with 1110 additions and 1098 deletions

View file

@ -34,7 +34,7 @@ interface IState {
export default class DialpadContextMenu extends React.Component<IProps, IState> {
private numberEntryFieldRef: React.RefObject<Field> = createRef();
constructor(props) {
public constructor(props) {
super(props);
this.state = {
@ -42,7 +42,7 @@ export default class DialpadContextMenu extends React.Component<IProps, IState>
};
}
onDigitPress = (digit: string, ev: ButtonEvent) => {
public onDigitPress = (digit: string, ev: ButtonEvent) => {
this.props.call.sendDtmfDigit(digit);
this.setState({ value: this.state.value + digit });
@ -54,22 +54,22 @@ export default class DialpadContextMenu extends React.Component<IProps, IState>
}
};
onCancelClick = () => {
public onCancelClick = () => {
this.props.onFinished();
};
onKeyDown = (ev) => {
public onKeyDown = (ev) => {
// Prevent Backspace and Delete keys from functioning in the entry field
if (ev.code === "Backspace" || ev.code === "Delete") {
ev.preventDefault();
}
};
onChange = (ev) => {
public onChange = (ev) => {
this.setState({ value: ev.target.value });
};
render() {
public render() {
return (
<ContextMenu {...this.props}>
<div className="mx_DialPadContextMenuWrapper">

View file

@ -29,7 +29,7 @@ interface IProps {
* menu.
*/
export default class GenericElementContextMenu extends React.Component<IProps> {
constructor(props: IProps) {
public constructor(props: IProps) {
super(props);
}

View file

@ -26,27 +26,27 @@ interface IProps extends IContextMenuProps {
}
export default class LegacyCallContextMenu extends React.Component<IProps> {
constructor(props) {
public constructor(props) {
super(props);
}
onHoldClick = () => {
public onHoldClick = () => {
this.props.call.setRemoteOnHold(true);
this.props.onFinished();
};
onUnholdClick = () => {
public onUnholdClick = () => {
LegacyCallHandler.instance.setActiveCallRoomId(this.props.call.roomId);
this.props.onFinished();
};
onTransferClick = () => {
public onTransferClick = () => {
LegacyCallHandler.instance.showTransferDialog(this.props.call);
this.props.onFinished();
};
render() {
public render() {
const holdUnholdCaption = this.props.call.isRemoteOnHold() ? _t("Resume") : _t("Hold");
const handler = this.props.call.isRemoteOnHold() ? this.onUnholdClick : this.onHoldClick;

View file

@ -135,12 +135,12 @@ interface IState {
}
export default class MessageContextMenu extends React.Component<IProps, IState> {
static contextType = RoomContext;
public static contextType = RoomContext;
public context!: React.ContextType<typeof RoomContext>;
private reactButtonRef = createRef<any>(); // XXX Ref to a functional component
constructor(props: IProps) {
public constructor(props: IProps) {
super(props);
this.state = {