Skip to content

Commit cc019c7

Browse files
committed
Fix linter issues
1 parent f05d54b commit cc019c7

3 files changed

Lines changed: 19 additions & 14 deletions

File tree

src/service/lootData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ export const lootTemplateMap: Record<LootKindId, LootTemplate> = {
583583
template,
584584
loot,
585585
false,
586+
// oxlint-disable-next-line typescript/no-misused-spread
586587
[...owner.id].map(n => (Number(n) * 7) % 10).join(""),
587588
),
588589
onDuplicateDrop: async (context, winner, loot, dropMessage) => {
@@ -634,6 +635,7 @@ export const lootTemplateMap: Record<LootKindId, LootTemplate> = {
634635
template,
635636
loot,
636637
false,
638+
// oxlint-disable-next-line typescript/no-misused-spread
637639
[...owner.id].map(n => (Number(n) * 13) % 10).join(""),
638640
),
639641
onDuplicateDrop: async (context, winner, loot, dropMessage) => {

src/storage/austrianTranslation.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,20 @@ export function findTranslation(
3939
): Promise<AustrianTranslation | undefined> {
4040
const normalized = austrian.trim().toLowerCase();
4141
const withoutWhitespace = normalized.replace(/[^\w\s]/gu, "");
42-
return ctx
43-
.selectFrom("austrianTranslations")
44-
.where(({ eb, or }) =>
45-
or([
46-
// we want like to be case-insensitive, we don't need a placeholder
47-
// We might have translations with punctuations in it, so we simply try to match the whole string against it
48-
eb("austrian", "like", normalized),
49-
// If we couldn't find a translation with the punctuations in it, we remove the special chars
50-
eb("austrian", "like", withoutWhitespace),
51-
]),
52-
)
53-
.selectAll()
54-
.executeTakeFirst();
42+
return (
43+
ctx
44+
.selectFrom("austrianTranslations")
45+
// oxlint-disable-next-line typescript/unbound-method
46+
.where(({ eb, or }) =>
47+
or([
48+
// we want like to be case-insensitive, we don't need a placeholder
49+
// We might have translations with punctuations in it, so we simply try to match the whole string against it
50+
eb("austrian", "like", normalized),
51+
// If we couldn't find a translation with the punctuations in it, we remove the special chars
52+
eb("austrian", "like", withoutWhitespace),
53+
]),
54+
)
55+
.selectAll()
56+
.executeTakeFirst()
57+
);
5558
}

src/utils/interactionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function ensureChatInputCommand<Cached extends CacheType = CacheType>(
99
return interaction;
1010
}
1111

12-
export function defer(action: () => unknown | Promise<unknown>): AsyncDisposable {
12+
export function defer(action: () => unknown): AsyncDisposable {
1313
return {
1414
async [Symbol.asyncDispose]() {
1515
await action();

0 commit comments

Comments
 (0)