Enable @typescript-eslint/explicit-function-return-type in /src (#9788)

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

* Prettier

* Enable `@typescript-eslint/explicit-function-return-type` in /src

* Fix types

* tsc strict fixes

* Delint

* Fix test

* Fix bad merge
This commit is contained in:
Michael Telatynski 2023-01-12 13:25:14 +00:00 committed by GitHub
parent 7a36ba0fde
commit 030b7e90bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
683 changed files with 3459 additions and 3013 deletions

View file

@ -46,7 +46,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
};
}
public updateCurrentRoom = async () => {
public updateCurrentRoom = async (): Promise<void> => {
const eventIndex = EventIndexPeg.get();
let stats;
@ -76,7 +76,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
this.updateState();
}
public async updateState() {
public async updateState(): Promise<void> {
const eventIndex = EventIndexPeg.get();
const eventIndexingEnabled = SettingsStore.getValueAt(SettingLevel.DEVICE, "enableEventIndexing");
const enabling = false;
@ -106,7 +106,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
});
}
private onManage = async () => {
private onManage = async (): Promise<void> => {
Modal.createDialogAsync(
// @ts-ignore: TS doesn't seem to like the type of this now that it
// has also been converted to TS as well, but I can't figure out why...
@ -120,7 +120,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
);
};
private onEnable = async () => {
private onEnable = async (): Promise<void> => {
this.setState({
enabling: true,
});
@ -132,9 +132,9 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
await this.updateState();
};
private confirmEventStoreReset = () => {
private confirmEventStoreReset = (): void => {
const { close } = Modal.createDialog(SeshatResetDialog, {
onFinished: async (success) => {
onFinished: async (success): Promise<void> => {
if (success) {
await SettingsStore.setValue("enableEventIndexing", null, SettingLevel.DEVICE, false);
await EventIndexPeg.deleteEventIndex();
@ -145,7 +145,7 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
});
};
public render() {
public render(): JSX.Element {
let eventIndexingSettings = null;
const brand = SdkConfig.get().brand;