Auto-fix lint errors
This commit is contained in:
parent
573698789e
commit
491b179971
17 changed files with 45 additions and 46 deletions
|
@ -25,17 +25,17 @@ window.React = React;
|
|||
|
||||
import * as sdk from 'matrix-react-sdk';
|
||||
import PlatformPeg from 'matrix-react-sdk/src/PlatformPeg';
|
||||
import {_td, newTranslatableError} from 'matrix-react-sdk/src/languageHandler';
|
||||
import { _td, newTranslatableError } from 'matrix-react-sdk/src/languageHandler';
|
||||
import AutoDiscoveryUtils from 'matrix-react-sdk/src/utils/AutoDiscoveryUtils';
|
||||
import {AutoDiscovery} from "matrix-js-sdk/src/autodiscovery";
|
||||
import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
|
||||
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
|
||||
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
|
||||
import {MatrixClientPeg} from 'matrix-react-sdk/src/MatrixClientPeg';
|
||||
import { MatrixClientPeg } from 'matrix-react-sdk/src/MatrixClientPeg';
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
|
||||
import {parseQs, parseQsFromFragment} from './url_utils';
|
||||
import { parseQs, parseQsFromFragment } from './url_utils';
|
||||
import VectorBasePlatform from "./platform/VectorBasePlatform";
|
||||
import {createClient} from "matrix-js-sdk/src/matrix";
|
||||
import { createClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
let lastLocationHashSet: string = null;
|
||||
|
||||
|
@ -257,12 +257,12 @@ async function verifyServerConfig() {
|
|||
|
||||
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
|
||||
} catch (e) {
|
||||
const {hsUrl, isUrl, userId} = await Lifecycle.getStoredSessionVars();
|
||||
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
|
||||
if (hsUrl && userId) {
|
||||
console.error(e);
|
||||
console.warn("A session was found - suppressing config error and using the session's homeserver");
|
||||
|
||||
console.log("Using pre-existing hsUrl and isUrl: ", {hsUrl, isUrl});
|
||||
console.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
|
||||
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
|
||||
} else {
|
||||
// the user is not logged in, so scream
|
||||
|
@ -277,7 +277,7 @@ async function verifyServerConfig() {
|
|||
|
||||
// Add the newly built config to the actual config for use by the app
|
||||
console.log("Updating SdkConfig with validated discovery information");
|
||||
SdkConfig.add({"validated_server_config": validatedConfig});
|
||||
SdkConfig.add({ "validated_server_config": validatedConfig });
|
||||
|
||||
return SdkConfig.get();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
|
|||
resolve({});
|
||||
}
|
||||
}
|
||||
reject({err: err, response: response});
|
||||
reject({ err: err, response: response });
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ function getConfig(configJsonFilename: string): Promise<{}> {
|
|||
// loading from the filesystem (see above).
|
||||
resolve(JSON.parse(body));
|
||||
} catch (e) {
|
||||
reject({err: e});
|
||||
reject({ err: e });
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
@ -26,7 +26,7 @@ require('highlight.js/styles/github.css');
|
|||
require('katex/dist/katex.css');
|
||||
|
||||
// These are things that can run before the skin loads - be careful not to reference the react-sdk though.
|
||||
import {parseQsFromFragment} from "./url_utils";
|
||||
import { parseQsFromFragment } from "./url_utils";
|
||||
import './modernizr';
|
||||
|
||||
async function settled(...promises: Array<Promise<any>>) {
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {IndexedDBStoreWorker} from 'matrix-js-sdk/src/indexeddb-worker.js';
|
||||
import { IndexedDBStoreWorker } from 'matrix-js-sdk/src/indexeddb-worker.js';
|
||||
|
||||
const remoteWorker = new IndexedDBStoreWorker(postMessage);
|
||||
|
||||
|
|
|
@ -31,10 +31,9 @@ import PWAPlatform from "./platform/PWAPlatform";
|
|||
import WebPlatform from "./platform/WebPlatform";
|
||||
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
|
||||
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
|
||||
import {setTheme} from "matrix-react-sdk/src/theme";
|
||||
|
||||
import {initRageshake, initRageshakeStore} from "./rageshakesetup";
|
||||
import { setTheme } from "matrix-react-sdk/src/theme";
|
||||
|
||||
import { initRageshake, initRageshakeStore } from "./rageshakesetup";
|
||||
|
||||
export const rageshakePromise = initRageshake();
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
require("./index.scss");
|
||||
|
||||
import * as qs from 'querystring';
|
||||
import {KJUR} from 'jsrsasign';
|
||||
import { KJUR } from 'jsrsasign';
|
||||
import {
|
||||
IOpenIDCredentials,
|
||||
IWidgetApiRequest,
|
||||
|
@ -138,7 +138,7 @@ let meetApi: any; // JitsiMeetExternalAPI
|
|||
});
|
||||
widgetApi.transport.reply(ev.detail, {}); // ack
|
||||
} else {
|
||||
widgetApi.transport.reply(ev.detail, {error: {message: "Conference not joined"}});
|
||||
widgetApi.transport.reply(ev.detail, { error: { message: "Conference not joined" } });
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -168,7 +168,7 @@ function switchVisibleContainers() {
|
|||
*/
|
||||
function createJWTToken() {
|
||||
// Header
|
||||
const header = {alg: 'HS256', typ: 'JWT'};
|
||||
const header = { alg: 'HS256', typ: 'JWT' };
|
||||
// Payload
|
||||
const payload = {
|
||||
// As per Jitsi token auth, `iss` needs to be set to something agreed between
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {getVectorConfig} from '../getconfig';
|
||||
import { getVectorConfig } from '../getconfig';
|
||||
|
||||
function onBackToElementClick() {
|
||||
// Cookie should expire in 4 hours
|
||||
|
|
|
@ -48,7 +48,7 @@ import React from "react";
|
|||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
|
||||
import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads";
|
||||
import { SwitchSpacePayload} from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
|
||||
import { SwitchSpacePayload } from "matrix-react-sdk/src/dispatcher/payloads/SwitchSpacePayload";
|
||||
import { showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
|
||||
import { CheckUpdatesPayload } from "matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload";
|
||||
import ToastStore from "matrix-react-sdk/src/stores/ToastStore";
|
||||
|
@ -119,8 +119,8 @@ class SeshatIndexManager extends BaseEventIndexManager {
|
|||
// TODO this should be moved into the preload.js file.
|
||||
const ipcCallId = ++this.nextIpcCallId;
|
||||
return new Promise((resolve, reject) => {
|
||||
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
|
||||
window.electron.send('seshat', {id: ipcCallId, name, args});
|
||||
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
|
||||
window.electron.send('seshat', { id: ipcCallId, name, args });
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -258,9 +258,9 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
dis.fire(Action.ViewUserSettings);
|
||||
});
|
||||
|
||||
electron.on('userDownloadCompleted', (ev, {path, name}) => {
|
||||
electron.on('userDownloadCompleted', (ev, { path, name }) => {
|
||||
const onAccept = () => {
|
||||
electron.send('userDownloadOpen', {path});
|
||||
electron.send('userDownloadOpen', { path });
|
||||
};
|
||||
|
||||
ToastStore.sharedInstance().addOrReplaceToast({
|
||||
|
@ -326,7 +326,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
return this._ipcCall('getConfig');
|
||||
}
|
||||
|
||||
onUpdateDownloaded = async (ev, {releaseNotes, releaseName}) => {
|
||||
onUpdateDownloaded = async (ev, { releaseNotes, releaseName }) => {
|
||||
dis.dispatch<CheckUpdatesPayload>({
|
||||
action: Action.CheckUpdates,
|
||||
status: UpdateCheckStatus.Ready,
|
||||
|
@ -497,8 +497,8 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
|||
async _ipcCall(name: string, ...args: any[]): Promise<any> {
|
||||
const ipcCallId = ++this.nextIpcCallId;
|
||||
return new Promise((resolve, reject) => {
|
||||
this.pendingIpcCalls[ipcCallId] = {resolve, reject};
|
||||
window.electron.send('ipcCall', {id: ipcCallId, name, args});
|
||||
this.pendingIpcCalls[ipcCallId] = { resolve, reject };
|
||||
window.electron.send('ipcCall', { id: ipcCallId, name, args });
|
||||
// Maybe add a timeout to these? Probably not necessary.
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import BasePlatform from 'matrix-react-sdk/src/BasePlatform';
|
||||
import {_t} from 'matrix-react-sdk/src/languageHandler';
|
||||
import {getVectorConfig} from "../getconfig";
|
||||
import { _t } from 'matrix-react-sdk/src/languageHandler';
|
||||
import { getVectorConfig } from "../getconfig";
|
||||
|
||||
import Favicon from "../../favicon";
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import VectorBasePlatform from './VectorBasePlatform';
|
||||
import {UpdateCheckStatus} from "matrix-react-sdk/src/BasePlatform";
|
||||
import { UpdateCheckStatus } from "matrix-react-sdk/src/BasePlatform";
|
||||
import request from 'browser-request';
|
||||
import dis from 'matrix-react-sdk/src/dispatcher/dispatcher';
|
||||
import {_t} from 'matrix-react-sdk/src/languageHandler';
|
||||
import {Room} from "matrix-js-sdk/src/models/room";
|
||||
import {hideToast as hideUpdateToast, showToast as showUpdateToast} from "matrix-react-sdk/src/toasts/UpdateToast";
|
||||
import {Action} from "matrix-react-sdk/src/dispatcher/actions";
|
||||
import { _t } from 'matrix-react-sdk/src/languageHandler';
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { hideToast as hideUpdateToast, showToast as showUpdateToast } from "matrix-react-sdk/src/toasts/UpdateToast";
|
||||
import { Action } from "matrix-react-sdk/src/dispatcher/actions";
|
||||
import { CheckUpdatesPayload } from 'matrix-react-sdk/src/dispatcher/payloads/CheckUpdatesPayload';
|
||||
|
||||
import UAParser from 'ua-parser-js';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue