From 9b1dca62e972646ae50e8584031247474294d553 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 24 Jan 2021 21:44:53 -0500 Subject: [PATCH] Spelling * application * called * coerce * command * conflicts * continuous * copying * declaration * dereference * different * discarded * ensures * entries * environment * equivalents * etc. * evaluate * github * hexadecimal * initialize * initializes * insensitively * library * listening * minimum * miscellaneous * multiple * primary * promoted * publicly * request * response * retrieval * separate * separated * shifted * shorten * socket * substituted * substitutes * substitutions * succeeds * typesafe * unavailable * undefined * while Signed-off-by: Josh Soref --- CHANGELOG.md | 2 +- CONTRIBUTING.md | 4 ++-- docs/extensions.md | 8 ++++---- docs/meta_edits.md | 4 ++-- docs/services.md | 2 +- gulpfile.js | 2 +- lang/en.json | 4 ++-- src/back/SocketServer.ts | 4 ++-- src/back/extensions/ApiImplementation.ts | 4 ++-- src/back/extensions/ExtensionUtils.ts | 4 ++-- src/back/importGame.ts | 4 ++-- src/back/responses.ts | 2 +- src/back/types.ts | 2 +- src/back/util/misc.ts | 2 +- src/back/util/sanitizeFilename.ts | 2 +- src/back/util/sql.ts | 2 +- src/database/entity/Game.ts | 2 +- src/main/Main.ts | 6 +++--- src/renderer/components/CurateBox.tsx | 2 +- src/renderer/components/ProgressComponents.tsx | 2 +- src/renderer/components/RightTagCategoriesSidebar.tsx | 2 +- src/renderer/components/RightTagsSidebar.tsx | 2 +- src/renderer/components/ServiceBox.tsx | 2 +- src/renderer/components/pages/AboutPage.tsx | 2 +- src/renderer/components/pages/CuratePage.tsx | 2 +- src/renderer/components/pages/LogsPage.tsx | 2 +- src/renderer/containers/withPreferences.tsx | 2 +- src/renderer/context/ProgressContext.ts | 4 ++-- src/renderer/store/main/enums.ts | 2 +- src/renderer/store/main/reducer.ts | 2 +- src/renderer/store/main/types.ts | 4 ++-- src/renderer/util/platform.ts | 2 +- src/renderer/util/queue.ts | 2 +- src/shared/IPC.ts | 4 ++-- src/shared/Util.ts | 4 ++-- src/shared/back/SocketClient.ts | 2 +- src/shared/back/types.ts | 2 +- src/shared/curate/parse.ts | 2 +- src/shared/legacy/interfaces.ts | 2 +- src/shared/utils/Coerce.ts | 2 +- tests/src/back/game/GameManager.test.ts | 2 +- tests/src/back/util/misc.test.ts | 2 +- tests/src/renderer/uuid.test.ts | 2 +- typings/flashpoint-launcher.d.ts | 2 +- 44 files changed, 60 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 143b1dd86..f14ca2bc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ There is now a TypeScript / JavaScript API available to interact with the Flashp ## Changed -- Flash Mode (:flash: applicaton path) has now been reworked into a general use Browser Mode so it can be used by Extensions. +- Flash Mode (:flash: application path) has now been reworked into a general use Browser Mode so it can be used by Extensions. ## Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f8ae937f4..7514263f0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,10 +39,10 @@ Must be one of the following: * **docs**: Documentation only changes * **feat**: A new feature * **fix**: A bug fix -* **github**: Changes to our Github CI configuration files or scripts +* **github**: Changes to our GitHub CI configuration files or scripts * **perf**: A code change that improves performance * **refactor**: A code change that neither fixes a bug nor adds a feature -* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.) * **test**: Adding missing tests or correcting existing tests ## Body diff --git a/docs/extensions.md b/docs/extensions.md index 884276e21..57a272bba 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -205,13 +205,13 @@ In this example, any game run with the `:my-application:` application path will However, Applications can also provide `url` or `command` instead. The full details of all 3 including `path` are listed below. -`path` will launch the application with the launch command as its arguments. You must use the `` or `` subtitutions to correctly reference the application. +`path` will launch the application with the launch command as its arguments. You must use the `` or `` substitutions to correctly reference the application. -`url` will launch that URL in Flashpoints Browser Mode (Electron). The launch command must be subtituted since it can not be given as an argument this way. See below for allowed subtitutions. +`url` will launch that URL in Flashpoints Browser Mode (Electron). The launch command must be substituted since it can not be given as an argument this way. See below for allowed substitutions. -`command` will run a registered command that is given the launching Game as an argument and expects a valid response of either a string (`path`) or BrowserApplicationOpts (`url`) which will then be run accordingly. Subtitutions cannot be used on the returned values, although you may find their equiavelents in the API, with an exception of os, arch and cwd which you may use Node types for. (`@types/node`) +`command` will run a registered command that is given the launching Game as an argument and expects a valid response of either a string (`path`) or BrowserApplicationOpts (`url`) which will then be run accordingly. Substitutions cannot be used on the returned values, although you may find their equivalents in the API, with an exception of os, arch and cwd which you may use Node types for. (`@types/node`) -`url` and `path` string subtitutes: +`url` and `path` string substitutes: - **\** - Path to the extension. - **\** - Path to the Flashpoint folder. diff --git a/docs/meta_edits.md b/docs/meta_edits.md index 854fd6b28..70db44b78 100644 --- a/docs/meta_edits.md +++ b/docs/meta_edits.md @@ -24,7 +24,7 @@ To import *all* meta edits: * Go the the Developer tab - If the tab is not displayed, go to the "Config" tab and enable "Show Developer Tab" * Click the "Import Meta Edits" button -* If there are any conficts in the meta edits you will be promted to select which value to apply +* If there are any conflicts in the meta edits you will be promoted to select which value to apply **Note:** This does *NOT* delete the meta edit files. The files have to be moved / deleted manually. @@ -70,7 +70,7 @@ Reasons for discarding includes: Discarded changes (X changes in Y games): () - : + : ... ... diff --git a/docs/services.md b/docs/services.md index b64a69245..47c6fbda9 100644 --- a/docs/services.md +++ b/docs/services.md @@ -2,7 +2,7 @@ The launcher provides multiple ways to run programs alongside. An example config is provided at the bottom of the page. -`` can be used in any file path. These will be substitued out for the absolute Flashpoint path as defined in Config. +`` can be used in any file path. These will be substituted out for the absolute Flashpoint path as defined in Config. ### File Layout diff --git a/gulpfile.js b/gulpfile.js index 60a0fb929..d74e7744c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -140,7 +140,7 @@ gulp.task('pack', (done) => { './build', ], extraFiles: copyFiles, // Files to copy to the build folder - compression: 'maximum', // Only used if a compressed target (like 7z, nsis, dmg etc) + compression: 'maximum', // Only used if a compressed target (like 7z, nsis, dmg etc.) target: 'dir', asar: true, publish: publish, diff --git a/lang/en.json b/lang/en.json index dc2b6bbbd..558666917 100644 --- a/lang/en.json +++ b/lang/en.json @@ -434,8 +434,8 @@ "areYouSure": "Are you sure?", "cancel": "Cancel", "mergePlaylists": "Merge Playlists", - "newPlaylist": "Stay Seperate", - "uploadPrivacyWarning": "This will make your Logs available publically.\nA link will be copied to your clipboard.\n\nAre you sure?", + "newPlaylist": "Stay Separate", + "uploadPrivacyWarning": "This will make your Logs available publicly.\nA link will be copied to your clipboard.\n\nAre you sure?", "overwriteFileTitle": "File already exists!", "overwriteFileMessage": "A file with the same name already exists. Do you want to overwrite it?", "overwriteFileDetail": "File path:" diff --git a/src/back/SocketServer.ts b/src/back/SocketServer.ts index 9c5cbf5da..548bfec41 100644 --- a/src/back/SocketServer.ts +++ b/src/back/SocketServer.ts @@ -53,7 +53,7 @@ export class SocketServer { /** * Try to listen on one of the ports in the given range (starting from the lowest). - * If it succeedes it will set the "server" and "port" properties of this object. + * If it succeeds it will set the "server" and "port" properties of this object. * If it fails it will reject with the error. * @param minPort Minimum port number (tried first). * @param maxPort Maximum port number (tried last). @@ -274,7 +274,7 @@ export class SocketServer { } type StartServerResult = { - /** WebScoket server (undefined if it failed to listen). */ + /** WebSocket server (undefined if it failed to listen). */ server: ws.Server; /** Port it is listening on (-1 if it failed to listen). */ port: number; diff --git a/src/back/extensions/ApiImplementation.ts b/src/back/extensions/ApiImplementation.ts index 1af295ac1..17db9dad9 100644 --- a/src/back/extensions/ApiImplementation.ts +++ b/src/back/extensions/ApiImplementation.ts @@ -23,7 +23,7 @@ import { Command } from './types'; /** * Create a Flashpoint API implementation specific to an extension, used during module load interception * @param extManifest Manifest of the caller - * @param registry Registry to register commands etc to + * @param registry Registry to register commands etc. to * @param addExtLog Function to add an Extensions log to the Logs page * @param version Version of the Flashpoint Launcher * @returns API Implementation specific to the caller @@ -305,6 +305,6 @@ export function createApiFactory(extId: string, extManifest: IExtensionManifest, registerDisposable: registerDisposable, newDisposable: newDisposable - // Note - Types are defined in the decleration file, not here + // Note - Types are defined in the declaration file, not here }; } diff --git a/src/back/extensions/ExtensionUtils.ts b/src/back/extensions/ExtensionUtils.ts index 7f9255202..c8533b336 100644 --- a/src/back/extensions/ExtensionUtils.ts +++ b/src/back/extensions/ExtensionUtils.ts @@ -33,7 +33,7 @@ export function getExtensionEntry(ext: IExtension): string { /** Creates an Extension log (Message format "[extension-name] ") * @param extManifest Manifest of the Extension * @param message Message to fill in - * @param func Log function to use (log.info, warn, error etc) + * @param func Log function to use (log.info, warn, error etc.) * @returns Complete Log Entry */ export function newExtLog(extManifest: IExtensionManifest, message: string, func: LogFunc): ILogEntry { @@ -43,7 +43,7 @@ export function newExtLog(extManifest: IExtensionManifest, message: string, func /** Creates an Extension Log Function * @param extManifest Manifest of the Extension * @param addLog Function to push new log onto Logs page stack - * @param func Log function to use (log.info, warn, error etc) + * @param func Log function to use (log.info, warn, error etc.) * @returns Function that logs an extensions message given just a message string */ export function extLogFactory(extManifest: IExtensionManifest, addLog: (entry: ILogEntry) => void, func: LogFunc): ExtensionLogFunc { diff --git a/src/back/importGame.ts b/src/back/importGame.ts index f75a87309..eb25add22 100644 --- a/src/back/importGame.ts +++ b/src/back/importGame.ts @@ -163,7 +163,7 @@ export async function importCuration(opts: ImportCurationOpts): Promise { date.getUTCDate().toString().padStart(2, '0'); const backupPath = path.join(fpPath, 'Curations', 'Imported', `${dateStr}__${curation.key}`); await fs.copy(getCurationFolder(curation, fpPath), backupPath); - // Why does this return before finishing coying? Replaced with line above for now. + // Why does this return before finishing copying? Replaced with line above for now. // await copyFolder(getCurationFolder(curation, fpPath), backupPath, true, opts.openDialog); } if (log) { @@ -317,7 +317,7 @@ async function importGameImage(image: CurationIndexImage, gameId: string, folder } } -/** Symlinks (or copies if unavailble) a curations `content` folder to `htdocs\content` +/** Symlinks (or copies if unavailable) a curations `content` folder to `htdocs\content` * @param curationKey Key of the (game) curation to link */ async function linkContentFolder(curationKey: string, fpPath: string, isDev: boolean, exePath: string, htdocsPath: string, symlinkCurationContent: boolean) { diff --git a/src/back/responses.ts b/src/back/responses.ts index c932faaa0..26b915df3 100644 --- a/src/back/responses.ts +++ b/src/back/responses.ts @@ -1035,7 +1035,7 @@ export function registerRequestCallbacks(state: BackState): void { }); state.socketServer.register(BackIn.RUN_COMMAND, async (event, command, args = []) => { - // Find comamnd + // Find command const c = state.registry.commands.get(command); let res = undefined; let success = false; diff --git a/src/back/types.ts b/src/back/types.ts index a048d2c1a..ba4f25ed0 100644 --- a/src/back/types.ts +++ b/src/back/types.ts @@ -118,7 +118,7 @@ export type ServiceFileData = { start: IBackProcessInfo[]; /** Processes to run when the launcher closes. */ stop: IBackProcessInfo[]; - /** Files to watch and run continous logging on */ + /** Files to watch and run continuous logging on */ watch: string[]; }; diff --git a/src/back/util/misc.ts b/src/back/util/misc.ts index 7ec4ee70d..9bbdfb793 100644 --- a/src/back/util/misc.ts +++ b/src/back/util/misc.ts @@ -128,7 +128,7 @@ export function exit(state: BackState): void { .catch(e => { console.error(e); }), // Close file server new Promise(resolve => state.fileServer.close(error => { - if (error) { console.warn('An error occurred whie closing the file server.', error); } + if (error) { console.warn('An error occurred while closing the file server.', error); } resolve(); })), // Wait for game manager to complete all saves diff --git a/src/back/util/sanitizeFilename.ts b/src/back/util/sanitizeFilename.ts index dcc95b693..957fe9210 100644 --- a/src/back/util/sanitizeFilename.ts +++ b/src/back/util/sanitizeFilename.ts @@ -66,7 +66,7 @@ function truncate(string: string, byteLength: number): string { * Reserved filenames in Windows ("CON", "PRN", "AUX", "NUL", "COM1", * "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", * "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", and - * "LPT9") case-insesitively and with or without filename extensions. + * "LPT9") case-insensitively and with or without filename extensions. * * Capped at 255 characters in length. * http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs diff --git a/src/back/util/sql.ts b/src/back/util/sql.ts index 41ddea3c6..d182e2e45 100644 --- a/src/back/util/sql.ts +++ b/src/back/util/sql.ts @@ -7,7 +7,7 @@ */ export function validateSqlName(name: string): void { // The first character is not allowed to be @ or # because they denote special values - // (They might be safe to use, but I don't know enough to evaludate that //obelisk) + // (They might be safe to use, but I don't know enough to evaluate that //obelisk) if (name.length > 128) { throw new Error(`SQL name validation failed! The name contains more than 128 characters (name: "${name}", length: ${name.length})!`); diff --git a/src/database/entity/Game.ts b/src/database/entity/Game.ts index c47ec6119..de3172746 100644 --- a/src/database/entity/Game.ts +++ b/src/database/entity/Game.ts @@ -77,7 +77,7 @@ export class Game { @ManyToMany(type => Tag, t => t.gamesUsing, { cascade: true, eager: true }) @JoinTable() - /** Tags of the game (seperated by semi-colon) */ + /** Tags of the game (separated by semi-colon) */ tags: Tag[]; @Column({collation: 'NOCASE'}) diff --git a/src/main/Main.ts b/src/main/Main.ts index ef06caced..f9768aa8c 100644 --- a/src/main/Main.ts +++ b/src/main/Main.ts @@ -74,7 +74,7 @@ export function main(init: Init): void { app.allowRendererProcessReuse = true; // Hides the "new default value" warning message (remove this line after upgrading to electron 9) // Single process - // No more than one "main" instance should exist at any time. Mutliple "flash" instances are fine. + // No more than one "main" instance should exist at any time. Multiple "flash" instances are fine. if (!app.requestSingleInstanceLock()) { app.exit(); return; @@ -164,7 +164,7 @@ export function main(init: Init): void { localeCode: localeCode, exePath: app.getPath('exe'), acceptRemote: !!init.args['host-remote'], - version: app.getVersion(), // @TODO Manually load this from the package.json file while in a dev enviroment (so it doesn't use Electron's version) + version: app.getVersion(), // @TODO Manually load this from the package.json file while in a dev environment (so it doesn't use Electron's version) }; state.backProc.send(JSON.stringify(msg)); })); @@ -403,7 +403,7 @@ export function main(init: Init): void { const isMaximized = window.isMaximized(); window.webContents.send(WindowIPC.WINDOW_RESIZE, size[0], size[1], isMaximized); }); - // Derefence window when closed + // Dereference window when closed window.on('closed', () => { if (state.window === window) { state.window = undefined; diff --git a/src/renderer/components/CurateBox.tsx b/src/renderer/components/CurateBox.tsx index 57eb876c3..c5a4c59fb 100644 --- a/src/renderer/components/CurateBox.tsx +++ b/src/renderer/components/CurateBox.tsx @@ -619,7 +619,7 @@ export function CurateBox(props: CurateBoxProps) { } }, [props.curation && props.curation.thumbnail, props.curation && props.curation.screenshot, disabled]); - // Own Lirary Options + // Own Library Options const ownLibraryOptions = useMemo(() => { // Add meta's library if invalid (special option) if (warnings.nonExistingLibrary && props.curation) { diff --git a/src/renderer/components/ProgressComponents.tsx b/src/renderer/components/ProgressComponents.tsx index 073c34913..7525305d3 100644 --- a/src/renderer/components/ProgressComponents.tsx +++ b/src/renderer/components/ProgressComponents.tsx @@ -30,7 +30,7 @@ export function AutoProgressComponent(props: ProgressComponentProps) { } } -/** Large centered primar text, smaller underneath secondary text. */ +/** Large centered primary text, smaller underneath secondary text. */ export function StatusBar(props: ProgressComponentProps) { return (
diff --git a/src/renderer/components/RightTagCategoriesSidebar.tsx b/src/renderer/components/RightTagCategoriesSidebar.tsx index b09d1165d..4a746319b 100644 --- a/src/renderer/components/RightTagCategoriesSidebar.tsx +++ b/src/renderer/components/RightTagCategoriesSidebar.tsx @@ -199,7 +199,7 @@ export class RightTagCategoriesSidebar extends React.Component { - console.log('clalled'); + console.log('called'); if (this.props.onDeleteCategory) { this.props.onDeleteCategory(); } diff --git a/src/renderer/components/RightTagsSidebar.tsx b/src/renderer/components/RightTagsSidebar.tsx index 4f6dbb37a..533b64287 100644 --- a/src/renderer/components/RightTagsSidebar.tsx +++ b/src/renderer/components/RightTagsSidebar.tsx @@ -351,7 +351,7 @@ export class RightTagsSidebar extends React.Component { - console.log('clalled'); + console.log('called'); if (this.props.onDeleteTag) { this.props.onDeleteTag(); } diff --git a/src/renderer/components/ServiceBox.tsx b/src/renderer/components/ServiceBox.tsx index eb9478678..95df215d9 100644 --- a/src/renderer/components/ServiceBox.tsx +++ b/src/renderer/components/ServiceBox.tsx @@ -165,7 +165,7 @@ function useInterval(callback: () => void, ms: number, deps?: any[]): void { } /** - * Stringify all entires that are from a specific source. + * Stringify all entries that are from a specific source. * @param entries Entries to stringify. * @param source The source to filter by. */ diff --git a/src/renderer/components/pages/AboutPage.tsx b/src/renderer/components/pages/AboutPage.tsx index 0060f69d6..abe7becae 100644 --- a/src/renderer/components/pages/AboutPage.tsx +++ b/src/renderer/components/pages/AboutPage.tsx @@ -80,7 +80,7 @@ export class AboutPage extends React.Component {

{strings.version}: {versionNumberToText(window.Shared.version)} ({window.Shared.version})

{strings.license}: {strings.licenseInfo}

- {link('Github', 'https://github.com/FlashpointProject/launcher')} + {link('GitHub', 'https://github.com/FlashpointProject/launcher')}
diff --git a/src/renderer/components/pages/CuratePage.tsx b/src/renderer/components/pages/CuratePage.tsx index 329119247..cb5833504 100644 --- a/src/renderer/components/pages/CuratePage.tsx +++ b/src/renderer/components/pages/CuratePage.tsx @@ -681,7 +681,7 @@ function scrollToDiv(id: string) { } } -/* Returns the width of a div ref, minumum 10 */ +/* Returns the width of a div ref, minimum 10 */ function getDivWidth(ref: React.RefObject) { if (!document.defaultView) { throw new Error('"document.defaultView" missing.'); } if (!ref.current) { throw new Error('div is missing.'); } diff --git a/src/renderer/components/pages/LogsPage.tsx b/src/renderer/components/pages/LogsPage.tsx index 8f6d1c1e9..350800048 100644 --- a/src/renderer/components/pages/LogsPage.tsx +++ b/src/renderer/components/pages/LogsPage.tsx @@ -218,7 +218,7 @@ export class LogsPage extends React.Component { onUploadClick = async (): Promise => { this.setState({ uploading: true }); const strings = this.context; - // IMPORTANT - Make sure they want to *publically* post their info + // IMPORTANT - Make sure they want to *publicly* post their info const res = await remote.dialog.showMessageBox({ title: strings.dialog.areYouSure, message: strings.dialog.uploadPrivacyWarning, diff --git a/src/renderer/containers/withPreferences.tsx b/src/renderer/containers/withPreferences.tsx index 516caf627..a58e29b04 100644 --- a/src/renderer/containers/withPreferences.tsx +++ b/src/renderer/containers/withPreferences.tsx @@ -14,7 +14,7 @@ export function withPreferences

(Component: React.ComponentType

) { const preferences = useContext(PreferencesContext); return ( ); }; diff --git a/src/renderer/context/ProgressContext.ts b/src/renderer/context/ProgressContext.ts index 3ad3039bd..48fd82d8a 100644 --- a/src/renderer/context/ProgressContext.ts +++ b/src/renderer/context/ProgressContext.ts @@ -174,7 +174,7 @@ function progressReducer(prevState: Record, } /** - * Returns the ProgressData of a parent (initalizes it if necessary) + * Returns the ProgressData of a parent (initializes it if necessary) * @param state Mutable ProgressState * @param key Parent's Key */ @@ -213,7 +213,7 @@ function ensureProgressIndex(state: ProgressData[], key: string): number { /** * Return a new ProgressHandle to be given out to other functions - * @param parentKey Identifier of parent (page, component etc) + * @param parentKey Identifier of parent (page, component etc.) * @param dispatch Dispatcher to ProgressContext * @returns Handle containing all data necessary to dispatch ProgressAction's */ diff --git a/src/renderer/store/main/enums.ts b/src/renderer/store/main/enums.ts index 11f8571f8..d64aeca2c 100644 --- a/src/renderer/store/main/enums.ts +++ b/src/renderer/store/main/enums.ts @@ -64,7 +64,7 @@ export enum MainActionType { export enum RequestState { /** Request is waiting to be made. */ WAITING, - /** Reqest has been made. Waiting for the response to be received. */ + /** Request has been made. Waiting for the response to be received. */ REQUESTED, /** Response has been received. */ RECEIVED, diff --git a/src/renderer/store/main/reducer.ts b/src/renderer/store/main/reducer.ts index 6979f960b..438c5c346 100644 --- a/src/renderer/store/main/reducer.ts +++ b/src/renderer/store/main/reducer.ts @@ -125,7 +125,7 @@ export function mainStateReducer(state: MainState = createInitialState(), action // Dirty games isDirty: true, pageState: {}, - // Update total (for the first reponse only) + // Update total (for the first response only) total: (view.total === undefined) ? action.total : view.total, diff --git a/src/renderer/store/main/types.ts b/src/renderer/store/main/types.ts index a3305e61f..ea5f9f7e4 100644 --- a/src/renderer/store/main/types.ts +++ b/src/renderer/store/main/types.ts @@ -24,7 +24,7 @@ export type View = { /** Page keyset of the results. */ pageKeyset: PageKeyset; }; - /** State of the meta request (undfined means the view is "idle" and no request should be made). */ + /** State of the meta request (undefined means the view is "idle" and no request should be made). */ metaState?: RequestState; /** Games to display. */ games: ViewGameSet; @@ -75,7 +75,7 @@ export type MainState = { randomGames: ViewGame[]; /** Whether we're currently requesting random games */ requestingRandomGames: boolean; - /** If the random games should be shiften when the request is complete. */ + /** If the random games should be shifted when the request is complete. */ shiftRandomGames: boolean; /** Data and state used for the upgrade system (optional install-able downloads from the HomePage). */ diff --git a/src/renderer/util/platform.ts b/src/renderer/util/platform.ts index e1eacd570..f58431be0 100644 --- a/src/renderer/util/platform.ts +++ b/src/renderer/util/platform.ts @@ -1,6 +1,6 @@ import { Game } from '@database/entity/Game'; -/** platform.ts is suggestion.ts modified for retreival of platform type */ +/** platform.ts is suggestion.ts modified for retrieval of platform type */ export function getPlatforms(games: Game[]): string [] { // Get the values from the game collection const map: { [key: string]: true } = {}; diff --git a/src/renderer/util/queue.ts b/src/renderer/util/queue.ts index f79c32a55..e4c1cf993 100644 --- a/src/renderer/util/queue.ts +++ b/src/renderer/util/queue.ts @@ -1,7 +1,7 @@ type QueueOneWrapper Promise> = (...args: Parameters) => void /** - * Esnures that the wrapped function can not be called until its returned promise is pending. + * Ensures that the wrapped function can not be called until its returned promise is pending. * If the wrapper is called before that and there is no call queued, * the call will be queued and executed when the promise resolves or rejects. * If there is a call queued then it will replace the currently queued call (hence "queueOne"). diff --git a/src/shared/IPC.ts b/src/shared/IPC.ts index f6518be71..4a2b3a239 100644 --- a/src/shared/IPC.ts +++ b/src/shared/IPC.ts @@ -1,7 +1,7 @@ -/** Channel to send the "intialize renderer" message over. */ +/** Channel to send the "initialize renderer" message over. */ export const InitRendererChannel = 'renderer-init'; -/** Message contents for the "initialze renderer" message. */ +/** Message contents for the "initialize renderer" message. */ export type InitRendererData = { isBackRemote: boolean; installed: boolean; diff --git a/src/shared/Util.ts b/src/shared/Util.ts index 01726861b..355421b3f 100644 --- a/src/shared/Util.ts +++ b/src/shared/Util.ts @@ -366,10 +366,10 @@ export function createErrorProxy(title: string): any { // @TODO Make it throw errors for all(?) cases (delete, construct etc.) get: (target, p, receiver) => { if (p === errorProxySymbol) { return errorProxyValue; } - throw new Error(`You must not get a value from ${title} before it is initialzed (property: "${p.toString()}").`); + throw new Error(`You must not get a value from ${title} before it is initialized (property: "${p.toString()}").`); }, set: (target, p, value, receiver) => { - throw new Error(`You must not set a value from ${title} before it is initialzed (property: "${p.toString()}").`); + throw new Error(`You must not set a value from ${title} before it is initialized (property: "${p.toString()}").`); }, }); } diff --git a/src/shared/back/SocketClient.ts b/src/shared/back/SocketClient.ts index 47b4fb241..48f90a64f 100644 --- a/src/shared/back/SocketClient.ts +++ b/src/shared/back/SocketClient.ts @@ -44,7 +44,7 @@ export class SocketClient { this.socketCon = socketCon; } - /** Resolves when the socket starts listening. If it is already listeningm this is resolved immediately. */ + /** Resolves when the socket starts listening. If it is already listening this is resolved immediately. */ whenListening(): Promise { return new Promise((resolve, reject) => { if (this.client.socket && this.client.socket.readyState === WebSocket.OPEN) { diff --git a/src/shared/back/types.ts b/src/shared/back/types.ts index 59fdd0a43..b4aaf5d32 100644 --- a/src/shared/back/types.ts +++ b/src/shared/back/types.ts @@ -411,7 +411,7 @@ export type SearchGamesOpts = { orderReverse: GameOrderReverse; } -/** Shortend version of Game returned in searches, makes for better performance. */ +/** Shorten version of Game returned in searches, makes for better performance. */ export type ViewGame = { id: string; title: string; diff --git a/src/shared/curate/parse.ts b/src/shared/curate/parse.ts index e7245b4dd..093b07bb2 100644 --- a/src/shared/curate/parse.ts +++ b/src/shared/curate/parse.ts @@ -130,7 +130,7 @@ function convertAddApp(item: IObjectParserProp, label: string | number | sy // Coerce an object into a sensible string function arrayStr(rawStr: any): string { if (Array.isArray(rawStr)) { - // Convert lists to ; seperated strings + // Convert lists to ; separated strings return rawStr.join('; '); } return str(rawStr); diff --git a/src/shared/legacy/interfaces.ts b/src/shared/legacy/interfaces.ts index 2d3872b33..663c1e8b9 100644 --- a/src/shared/legacy/interfaces.ts +++ b/src/shared/legacy/interfaces.ts @@ -35,7 +35,7 @@ export interface Legacy_IPureGameInfo { status: string; /** Information that could be useful for the player (of varying importance) */ notes: string; - /** Tags of the game (seperated by semi-colon) */ + /** Tags of the game (separated by semi-colon) */ tags: string; /** Source if the game files, either full URL or the name of the website */ source: string; diff --git a/src/shared/utils/Coerce.ts b/src/shared/utils/Coerce.ts index 09139231c..b5be959e8 100644 --- a/src/shared/utils/Coerce.ts +++ b/src/shared/utils/Coerce.ts @@ -20,7 +20,7 @@ export namespace Coerce { } /** - * Coere a value to a number. + * Coerce a value to a number. * If the coerced value is NaN, 0 will be returned instead. * @param value Value to coerce. */ diff --git a/tests/src/back/game/GameManager.test.ts b/tests/src/back/game/GameManager.test.ts index 44f2e5094..666039512 100644 --- a/tests/src/back/game/GameManager.test.ts +++ b/tests/src/back/game/GameManager.test.ts @@ -56,7 +56,7 @@ describe('GameManager', () => { } }); - test('Add Games & AddApps (to differnt and non-existing platforms)', () => { + test('Add Games & AddApps (to different and non-existing platforms)', () => { // Setup const state = createState(); for (let i = 0; i < 10; i++) { diff --git a/tests/src/back/util/misc.test.ts b/tests/src/back/util/misc.test.ts index 628a89321..0b321a285 100644 --- a/tests/src/back/util/misc.test.ts +++ b/tests/src/back/util/misc.test.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import { pathExists, copyError } from '@back/util/misc'; -describe('Miscellanous Backend', () => { +describe('Miscellaneous Backend', () => { test('Check Path Exists', async () => { const realPath = './'; const fakePath = path.join('./', 'FAKE_PATH'); diff --git a/tests/src/renderer/uuid.test.ts b/tests/src/renderer/uuid.test.ts index 8c2a2132e..86a6768a9 100644 --- a/tests/src/renderer/uuid.test.ts +++ b/tests/src/renderer/uuid.test.ts @@ -28,7 +28,7 @@ describe('uuid.validateSemiUUID()', function () { const str = 'asdhbgfgfgajk123214543612312323asadghfga'; expect(validateSemiUUID(str)).toBe(false); }); - test('Invalid hexidecimal characters', () => { + test('Invalid hexadecimal characters', () => { const str = 'bbzz1234-0abc-llll-abcd-abc12345678z'; expect(validateSemiUUID(str)).toBe(false); }); diff --git a/typings/flashpoint-launcher.d.ts b/typings/flashpoint-launcher.d.ts index 96a35bc63..4b12cb0ee 100644 --- a/typings/flashpoint-launcher.d.ts +++ b/typings/flashpoint-launcher.d.ts @@ -671,7 +671,7 @@ declare module 'flashpoint-launcher' { games: T extends true ? ViewGame[] : Game[]; }; - /** Shortend version of {@link Game} returned in searches, makes for better performance. */ + /** Shorten version of {@link Game} returned in searches, makes for better performance. */ type ViewGame = { id: string; title: string;