Skip to content

Commit 165e04a

Browse files
committed
chore: Minor code cleanup
1 parent 6a989b5 commit 165e04a

File tree

14 files changed

+25
-25
lines changed

14 files changed

+25
-25
lines changed

src/lib/data/opts-list-item.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default abstract class OptsListItem {
2222
/** Option values */
2323
public opts!: Obj<any>; // Gets set in extending classes' constructors
2424

25-
public constructor({opts}: Init) {
25+
protected constructor({opts}: Init) {
2626
if (opts) {
2727
this.opts = opts;
2828
}

src/lib/util/export-modal.mts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ export function showExportModal(title: string, contents: any): void {
1111
html.textContent = JSON.stringify(contents);
1212
html.readOnly = true;
1313

14-
Swal // eslint-disable-line @typescript-eslint/no-floating-promises
14+
Swal
1515
.fire({
1616
confirmButtonText: 'OK',
1717
html,
1818
showCancelButton: false,
1919
showConfirmButton: true,
2020
title,
21-
});
21+
})
22+
.catch(console.error);
2223
}
2324

2425
/** @return Pasted JSON */

src/lib/util/registry-utils/get-from-registry-or-log.mts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/option-types/media-item/media-edit-base.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function RenderBtn<T extends MediaSelectable>({icon = true, value, onChange}: Bt
5050

5151
return (
5252
<Btn kind={'primary'} size={'sm'} onClick={unselect}>
53-
{icon && <img class={'ActionWorkflowsCore-font-sized mr-1'} src={value.media}/>}
53+
{icon && <img class={'ActionWorkflowsCore-font-sized mr-1'} src={value.media} alt={'Icon'}/>}
5454
<span>{value.name}</span>
5555
</Btn>
5656
);

src/ui/pages/import-export-page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ function ExportAll(): VNode {
106106
}
107107

108108
function alertDone() {
109-
Swal // eslint-disable-line @typescript-eslint/no-floating-promises
109+
Swal
110110
.fire({
111111
confirmButtonText: 'OK',
112112
showCancelButton: false,
113113
showConfirmButton: true,
114114
text: 'Done!',
115-
});
115+
})
116+
.catch(console.error);
116117
}

src/ui/pages/workflows-dashboard/render-node-media.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface RenderNodeMediaProps extends Pick<NodeDefinition, 'media'> {
99
export function RenderNodeMedia({label, media}: RenderNodeMediaProps): VNode {
1010
return (
1111
<Fragment>
12-
<img class={'ActionWorkflowsCore-font-sized mr-1'} src={media}/>
12+
<img class={'ActionWorkflowsCore-font-sized mr-1'} src={media} alt={'Icon'}/>
1313
<span>{label}</span>
1414
</Fragment>
1515
);

types/melvor/game/combat.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// noinspection JSUnusedGlobalSymbols
2+
13
import {BaseSpell, NamespacedObject} from './core';
24
import {Skill} from './skilling';
35
import type {Character} from './toon';

types/melvor/game/core.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// noinspection JSUnusedGlobalSymbols
2+
13
import {ActivePrayer, CombatArea, CombatSpell, Dungeon, Pet, PetManager, SlayerArea, SpecialAttack} from 'melvor';
24
import type {Monster} from './combat';
35
import {Attack, AttackStyle} from './combat';

types/melvor/game/item.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// noinspection JSUnusedGlobalSymbols
2+
13
import type {PotionReuseTarget} from './misc';
24
import type {EquipSlotType} from './toon';
35

types/melvor/game/misc.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// noinspection JSUnusedGlobalSymbols
2+
13
import {CombatArea, Dungeon, Enemy, Monster} from 'melvor/game/combat';
24
import type {NamespaceRegistry} from './core';
35
import type {Item, PotionItem} from './item';

0 commit comments

Comments
 (0)