Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions resources/regexes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ const parseHelper = <T extends LogDefinitionName>(
defaultFieldValue,
);
} else {
// FIXME: handle lint error here
// ref: https://github.com/OverlayPlugin/cactbot/pull/274#discussion_r1692439720
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
str += fieldValue;
}
}
Expand Down
2 changes: 2 additions & 0 deletions ui/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ export class CactbotConfigurator {
const args = Array.isArray(path) ? path : [path];
const info = JSON.stringify([group, ...args].join(', '));
console.error(
// FIXME:
// eslint-disable-next-line @typescript-eslint/no-base-to-string
`Unexpected type: ${info}, ${objOrValue.toString()}, ${typeof objOrValue}, ${typeof defaultValue}`,
);
return defaultValue;
Expand Down
2 changes: 2 additions & 0 deletions ui/pullcounter/pullcounter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ class PullCounter {

try {
if (typeof e.data !== 'string')
// FIXME:
// eslint-disable-next-line @typescript-eslint/no-base-to-string
throw new Error(e.data.toString());

const parsed: unknown = JSON.parse(e.data);
Expand Down
2 changes: 2 additions & 0 deletions ui/raidboss/popup-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,8 @@ export class PopupText {
if (result !== undefined) {
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
if (result)
// FIXME:
// eslint-disable-next-line @typescript-eslint/no-base-to-string
triggerHelper.ttsText = result?.toString();
} else {
triggerHelper.ttsText = triggerHelper.defaultTTSText;
Expand Down
7 changes: 6 additions & 1 deletion ui/raidboss/raidboss_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,9 @@ const setOptionsFromOutputValue = (
options.SoundAlertsEnabled = false;
options.SpokenAlertsEnabled = false;
} else {
// FIXME: handle lint error here
// ref: https://github.com/OverlayPlugin/cactbot/pull/274#discussion_r1692375852
// eslint-ignore-next-line @typescript-eslint/no-base-to-string
console.error(`unknown output type: ${value.toString()}`);
}
};
Expand Down Expand Up @@ -762,6 +765,7 @@ class RaidbossConfigurator {
detailText = this.base.translate(kMiscTranslations.valueIsFunction);
detailCls.push('function-text');
} else {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
detailText = trigFunc.toString();
}

Expand Down Expand Up @@ -1345,7 +1349,8 @@ class RaidbossConfigurator {
if (result === null || result === undefined)
return false;

// Super hack:
// FIXME: Super hack:
// eslint-disable-next-line @typescript-eslint/no-base-to-string
const resultStr = result.toString();
if (resultStr.includes('undefined') || resultStr.includes('NaN'))
return false;
Expand Down
7 changes: 6 additions & 1 deletion util/logtools/generate_triggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ type XIVAPINpcYellResponse = {
type XIVAPIBattleTalk2Response = XIVAPINpcYellResponse;

type TriggerSuggestTypes = typeof triggerSuggestOptions[number];
type TriggerSuggestTypesFull =
| TriggerSuggestTypes
| `AoE (circle, range = ${number})`
| `Rectangle AoE, CastType = ${number}`
| 'Plus AoE';

type GenerateTriggersArgs = {
'files': string[] | null;
Expand Down Expand Up @@ -1249,7 +1254,7 @@ const generateTriggersTextFromTriggerInfo = async (
// TODO: More default suggestions. Figure out how things work for square (CastType=12)
// vs left/right/etc positioning
const castTypeSuggestions = new Set<TriggerSuggestTypes>();
const castTypeFullSuggestions = new Set<TriggerSuggestTypes | string>();
const castTypeFullSuggestions = new Set<TriggerSuggestTypesFull>();
if (xivapiAbilityInfo !== undefined) {
const xivApiAbilities = mapInfo.fights
.flatMap((fight) => fight.instances.filter((instance) => instance.groups?.type === '20'))
Expand Down