lint: turn on @stylistic/js/semi

This commit is contained in:
Simon Ser 2024-09-29 11:48:45 +02:00
parent b93db7ac0e
commit b9d12bc8cd
5 changed files with 7 additions and 6 deletions

View file

@ -116,7 +116,7 @@ export default {
usage: "[message]",
description: "Set away message",
execute: (app, args) => {
const params = []
const params = [];
if (args.length) {
params.push(args.join(" "));
}

View file

@ -25,6 +25,7 @@ export default [
"no-var": "error",
"@stylistic/js/indent": ["warn", "tab"],
"@stylistic/js/quotes": ["warn", "double"],
"@stylistic/js/semi": "warn",
},
},
];

View file

@ -710,7 +710,7 @@ export default class Client extends EventTarget {
if (!this.ws) {
throw new Error("Failed to send IRC message " + msg.command + ": socket is closed");
}
let raw = irc.formatMessage(msg)
let raw = irc.formatMessage(msg);
this.ws.send(raw);
if (this.debug) {
console.debug("Sent:", raw);

View file

@ -123,7 +123,7 @@ export function parseTags(s) {
if (parts.length == 2) {
v = unescapeTag(parts[1]);
if (v.endsWith("\\")) {
v = v.slice(0, v.length - 1)
v = v.slice(0, v.length - 1);
}
}
tags[k] = v;
@ -241,7 +241,7 @@ export function formatMessage(msg) {
s += msg.command;
if (msg.params && msg.params.length > 0) {
for (let i = 0; i < msg.params.length - 1; i++) {
s += " " + msg.params[i]
s += " " + msg.params[i];
}
let last = String(msg.params[msg.params.length - 1]);

View file

@ -43,7 +43,7 @@ export default function linkify(text, onClick) {
return;
}
const prefix = text.substring(last, match.start)
const prefix = text.substring(last, match.start);
children.push(prefix);
children.push(html`
@ -58,7 +58,7 @@ export default function linkify(text, onClick) {
last = match.end;
});
const suffix = text.substring(last)
const suffix = text.substring(last);
children.push(suffix);
return children;