mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
lint: turn on @stylistic/js/semi
This commit is contained in:
parent
b93db7ac0e
commit
b9d12bc8cd
5 changed files with 7 additions and 6 deletions
|
@ -116,7 +116,7 @@ export default {
|
||||||
usage: "[message]",
|
usage: "[message]",
|
||||||
description: "Set away message",
|
description: "Set away message",
|
||||||
execute: (app, args) => {
|
execute: (app, args) => {
|
||||||
const params = []
|
const params = [];
|
||||||
if (args.length) {
|
if (args.length) {
|
||||||
params.push(args.join(" "));
|
params.push(args.join(" "));
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ export default [
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"@stylistic/js/indent": ["warn", "tab"],
|
"@stylistic/js/indent": ["warn", "tab"],
|
||||||
"@stylistic/js/quotes": ["warn", "double"],
|
"@stylistic/js/quotes": ["warn", "double"],
|
||||||
|
"@stylistic/js/semi": "warn",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -710,7 +710,7 @@ export default class Client extends EventTarget {
|
||||||
if (!this.ws) {
|
if (!this.ws) {
|
||||||
throw new Error("Failed to send IRC message " + msg.command + ": socket is closed");
|
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);
|
this.ws.send(raw);
|
||||||
if (this.debug) {
|
if (this.debug) {
|
||||||
console.debug("Sent:", raw);
|
console.debug("Sent:", raw);
|
||||||
|
|
|
@ -123,7 +123,7 @@ export function parseTags(s) {
|
||||||
if (parts.length == 2) {
|
if (parts.length == 2) {
|
||||||
v = unescapeTag(parts[1]);
|
v = unescapeTag(parts[1]);
|
||||||
if (v.endsWith("\\")) {
|
if (v.endsWith("\\")) {
|
||||||
v = v.slice(0, v.length - 1)
|
v = v.slice(0, v.length - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tags[k] = v;
|
tags[k] = v;
|
||||||
|
@ -241,7 +241,7 @@ export function formatMessage(msg) {
|
||||||
s += msg.command;
|
s += msg.command;
|
||||||
if (msg.params && msg.params.length > 0) {
|
if (msg.params && msg.params.length > 0) {
|
||||||
for (let i = 0; i < msg.params.length - 1; i++) {
|
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]);
|
let last = String(msg.params[msg.params.length - 1]);
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default function linkify(text, onClick) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prefix = text.substring(last, match.start)
|
const prefix = text.substring(last, match.start);
|
||||||
children.push(prefix);
|
children.push(prefix);
|
||||||
|
|
||||||
children.push(html`
|
children.push(html`
|
||||||
|
@ -58,7 +58,7 @@ export default function linkify(text, onClick) {
|
||||||
last = match.end;
|
last = match.end;
|
||||||
});
|
});
|
||||||
|
|
||||||
const suffix = text.substring(last)
|
const suffix = text.substring(last);
|
||||||
children.push(suffix);
|
children.push(suffix);
|
||||||
|
|
||||||
return children;
|
return children;
|
||||||
|
|
Loading…
Reference in a new issue