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
+6 -6
View File
@@ -202,7 +202,7 @@ export class Client {
/**
* Create a room with given options.
* @param options the options to apply when creating the room
* @return the ID of the newly created room
* @returns the ID of the newly created room
*/
public async createRoom(options: ICreateRoomOpts): Promise<string> {
const client = await this.prepareClient();
@@ -217,7 +217,7 @@ export class Client {
/**
* Create a space with given options.
* @param options the options to apply when creating the space
* @return the ID of the newly created space (room)
* @returns the ID of the newly created space (room)
*/
public async createSpace(options: ICreateRoomOpts): Promise<string> {
return this.createRoom({
@@ -412,8 +412,8 @@ export class Client {
/**
* @param {string} name
* @param {module:client.callback} callback Optional.
* @return {Promise} Resolves: {} an empty object.
* @return {module:http-api.MatrixError} Rejects: with an error response.
* @returns {Promise} Resolves: {} an empty object.
* @returns {module:http-api.MatrixError} Rejects: with an error response.
*/
public async setDisplayName(name: string): Promise<EmptyObject> {
const client = await this.prepareClient();
@@ -423,8 +423,8 @@ export class Client {
/**
* @param {string} url
* @param {module:client.callback} callback Optional.
* @return {Promise} Resolves: {} an empty object.
* @return {module:http-api.MatrixError} Rejects: with an error response.
* @returns {Promise} Resolves: {} an empty object.
* @returns {module:http-api.MatrixError} Rejects: with an error response.
*/
public async setAvatarUrl(url: string): Promise<EmptyObject> {
const client = await this.prepareClient();