Switch from eslint to oxlint (#34166)

* Fix type imports

* Fix jsdoc

* Fixup types

* Fix stray awaits on non-thenables

* Fixup imports

* Fix splats

* Fix this-context on callbacks

* Memoise react contexts

* Prefer find/flatMap

* Make oxlint happier about our React keys

* Avoid unsafe default function params

* Fixup jsdoc

* Fixup contexts

* Switch from eslint to oxlint

* Some oxlint-related tweaks

* Iterate

* Partial revert to defer some changes and shrink diff

* Iterate

* Add eslint-plugin-element-call and enable the copyright rule

* Set strictStorePkgContentCheck

* Iterate

* Make sonar happy

* Fix new lints
This commit is contained in:
Michael Telatynski
2026-07-10 09:47:41 +00:00
committed by GitHub
parent 549dd1b7a8
commit 15c85ec50f
176 changed files with 1294 additions and 2876 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import { ComponentType, SVGAttributes } from "react";
import { type ComponentType, type SVGAttributes } from "react";
/**
* An option presented to the user for uploading a file.
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
import type { JSX, ReactNode } from "react";
import type { MatrixEvent } from "../models/event";
import type { AccountAuthInfo } from "./auth.ts";
import { ComposerApiTarget } from "./composer.ts";
import type { ComposerApiTarget } from "./composer.ts";
/**
* Properties for all message components.
@@ -129,12 +129,12 @@ export type CustomLoginComponentProps = {
* Function to complete login
* @param data - the data to authenticate the user with
*/
onLoggedIn(data: AccountAuthInfo): void;
onLoggedIn(this: void, data: AccountAuthInfo): void;
/**
* Function to change the selected server
* @param config - new server configuration details
*/
onServerConfigChange(config: CustomLoginComponentPropsServerConfig): void;
onServerConfigChange(this: void, config: CustomLoginComponentPropsServerConfig): void;
};
/**
+3 -3
View File
@@ -30,7 +30,7 @@ export type DialogHandle<M> = {
/**
* Method to close the dialog.
*/
close(): void;
close(this: void): void;
};
/**
@@ -42,11 +42,11 @@ export type DialogProps<M> = {
* Callback to submit the dialog.
* @param model - The model to submit with the dialog. This is typically the data collected.
*/
onSubmit(model: M): void;
onSubmit(this: void, model: M): void;
/**
* Cancel the dialog programmatically.
*/
onCancel(): void;
onCancel(this: void): void;
};
/**