1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Migrate to eslint-plugin-matrix-org

This migrates to the new plugin form of our custom ESLint configs. As part of
this, some packages are de-duplicated, configs streamlined, etc.
This commit is contained in:
J. Ryan Stinnett
2021-03-12 16:31:11 +00:00
parent c5fb351baa
commit 102704e91a
8 changed files with 158 additions and 734 deletions

View File

@@ -206,9 +206,9 @@ export function getDesktopCapturerSources(): Promise<Array<DesktopCapturerSource
}
export class CallError extends Error {
code : string;
code: string;
constructor(code : CallErrorCode, msg: string, err: Error) {
constructor(code: CallErrorCode, msg: string, err: Error) {
// Stil ldon't think there's any way to have proper nested errors
super(msg + ": " + err);
@@ -450,7 +450,7 @@ export class MatrixCall extends EventEmitter {
* video will be rendered to it immediately.
* @param {Element} element The <code>&lt;video&gt;</code> DOM element.
*/
public async setLocalVideoElement(element : HTMLVideoElement) {
public async setLocalVideoElement(element: HTMLVideoElement) {
this.localVideoElement = element;
if (element && this.localAVStream && this.type === CallType.Video) {
@@ -471,7 +471,7 @@ export class MatrixCall extends EventEmitter {
* the first received video-capable stream will be rendered to it immediately.
* @param {Element} element The <code>&lt;video&gt;</code> DOM element.
*/
public setRemoteVideoElement(element : HTMLVideoElement) {
public setRemoteVideoElement(element: HTMLVideoElement) {
if (element === this.remoteVideoElement) return;
element.autoplay = true;
@@ -1199,7 +1199,7 @@ export class MatrixCall extends EventEmitter {
}
}
private callHasEnded() : boolean {
private callHasEnded(): boolean {
// This exists as workaround to typescript trying to be clever and erroring
// when putting if (this.state === CallState.Ended) return; twice in the same
// function, even though that function is async.