Stop eslint clobbering code, add a comment for improvement

pull/100/head
Skyler Grey 3 years ago
parent 5e1b475c0e
commit e64162342d
Signed by: Minion3665
GPG Key ID: 1AFD10256B3C714D

@ -18,6 +18,9 @@ const channelTypeEmoji: Record<number, string> = {
99: "Rules" // Rules channel
};
// this eslint rule is invalid here, as the type definition is actually incorrect
// if you make it an interface due to the [key: string]: unknown line. Try it if you like :)
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
type channelChanges = {
channelId: ReturnType<typeof entry>;
channel: ReturnType<typeof entry>;

@ -470,7 +470,7 @@ export class Transcript {
if (child.type === ComponentType.Button) {
obj.style = child.style;
obj.label = child.label ?? "";
} else if (child.type > 2) {
} else if (child.type > 2) { // FIXME: Can we write this more clearly to make it obvious what we mean by 2 here?
obj.placeholder = child.placeholder ?? "";
}
return obj;

Loading…
Cancel
Save