Run a minor code quality checker over the repo (#8524)
* Run a minor code quality checker over the repo Largely targeted at spelling of common words and misc code issues. * Update snapshots
This commit is contained in:
parent
89d7760f36
commit
548290b006
56 changed files with 72 additions and 72 deletions
|
@ -142,7 +142,7 @@ export default class DMRoomMap {
|
|||
/**
|
||||
* Gets the DM room which the given IDs share, if any.
|
||||
* @param {string[]} ids The identifiers (user IDs and email addresses) to look for.
|
||||
* @returns {Room} The DM room which all IDs given share, or falsey if no common room.
|
||||
* @returns {Room} The DM room which all IDs given share, or falsy if no common room.
|
||||
*/
|
||||
public getDMRoomForIdentifiers(ids: string[]): Room {
|
||||
// TODO: [Canonical DMs] Handle lookups for email addresses.
|
||||
|
|
|
@ -25,7 +25,7 @@ import { _t, _td, Tags, TranslatedString } from '../languageHandler';
|
|||
*
|
||||
* @param {string} limitType The limit_type from the error
|
||||
* @param {string} adminContact The admin_contact from the error
|
||||
* @param {Object} strings Translateable string for different
|
||||
* @param {Object} strings Translatable string for different
|
||||
* limit_type. Must include at least the empty string key
|
||||
* which is the default. Strings may include an 'a' tag
|
||||
* for the admin contact link.
|
||||
|
|
|
@ -64,7 +64,7 @@ export function presentableTextForFile(
|
|||
// big a file they are downloading.
|
||||
// The content.info also contains a MIME-type but we don't display
|
||||
// it since it is "ugly", users generally aren't aware what it
|
||||
// means and the type of the attachment can usually be inferrered
|
||||
// means and the type of the attachment can usually be inferred
|
||||
// from the file extension.
|
||||
text += ' (' + filesize(content.info.size) + ')';
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ export class LazyValue<T> {
|
|||
* Whether or not a cached value is present.
|
||||
*/
|
||||
public get present(): boolean {
|
||||
// we use a tracking variable just in case the final value is falsey
|
||||
// we use a tracking variable just in case the final value is falsy
|
||||
return this.done;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ const keyMap = new EnhancedMap<Object, EnhancedMap<string, unknown>>();
|
|||
* second call comes through late. There are various functions named "forget"
|
||||
* to have the cache be cleared of a result.
|
||||
*
|
||||
* Singleflights in our usecase are tied to an instance of something, combined
|
||||
* Singleflights in our use case are tied to an instance of something, combined
|
||||
* with a string key to differentiate between multiple possible actions. This
|
||||
* means that a "save" key will be scoped to the instance which defined it and
|
||||
* not leak between other instances. This is done to avoid having to concatenate
|
||||
|
|
|
@ -54,7 +54,7 @@ export const useBeacon = (beaconInfoEvent: MatrixEvent): Beacon | undefined => {
|
|||
}
|
||||
}, [beaconInfoEvent, matrixClient]);
|
||||
|
||||
// beacon update will fire when this beacon is superceded
|
||||
// beacon update will fire when this beacon is superseded
|
||||
// check the updated event id for equality to the matrix event
|
||||
const beaconInstanceEventId = useEventEmitterState(
|
||||
beacon,
|
||||
|
|
|
@ -175,7 +175,7 @@ export class ThreepidMember extends Member {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
// This is a getter that would be falsey on all other implementations. Until we have
|
||||
// This is a getter that would be falsy on all other implementations. Until we have
|
||||
// better type support in the react-sdk we can use this trick to determine the kind
|
||||
// of 3PID we're dealing with, if any.
|
||||
get isEmail(): boolean {
|
||||
|
|
|
@ -120,7 +120,7 @@ a.mx_reply_anchor:hover {
|
|||
}
|
||||
|
||||
.mx_ReplyChain_Export {
|
||||
margin-top: 0px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses an app route (`(user|room)/identifer`) to a Matrix entity
|
||||
* Parses an app route (`(user|room)/identifier`) to a Matrix entity
|
||||
* (room, user).
|
||||
* @param {string} route The app route
|
||||
* @returns {PermalinkParts}
|
||||
|
|
|
@ -274,7 +274,7 @@ export function makeUserPermalink(userId: string): string {
|
|||
|
||||
export function makeRoomPermalink(roomId: string): string {
|
||||
if (!roomId) {
|
||||
throw new Error("can't permalink a falsey roomId");
|
||||
throw new Error("can't permalink a falsy roomId");
|
||||
}
|
||||
|
||||
// If the roomId isn't actually a room ID, don't try to list the servers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue