Prefix unused variables with an underscore

This commit is contained in:
Simon Ser 2024-09-28 21:44:23 +02:00
parent b89fd604d0
commit 97920ff7f6
3 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ function isProduction() {
// NODE_ENV is set by the Parcel build system // NODE_ENV is set by the Parcel build system
try { try {
return process.env.NODE_ENV === "production"; return process.env.NODE_ENV === "production";
} catch (err) { } catch (_err) {
return false; return false;
} }
} }
@ -1960,7 +1960,7 @@ export default class App extends Component {
handleOpenSettingsClick() { handleOpenSettingsClick() {
let showProtocolHandler = false; let showProtocolHandler = false;
for (let [id, client] of this.clients) { for (let [_id, client] of this.clients) {
if (client.caps.enabled.has("soju.im/bouncer-networks")) { if (client.caps.enabled.has("soju.im/bouncer-networks")) {
showProtocolHandler = true; showProtocolHandler = true;
break; break;

View File

@ -272,7 +272,7 @@ export function parseTargetPrefix(s, allowedPrefixes = STD_MEMBERSHIPS) {
const alphaNum = (() => { const alphaNum = (() => {
try { try {
return new RegExp(/^[\p{L}0-9]$/, "u"); return new RegExp(/^[\p{L}0-9]$/, "u");
} catch (e) { } catch (_e) {
return new RegExp(/^[a-zA-Z0-9]$/, "u"); return new RegExp(/^[a-zA-Z0-9]$/, "u");
} }
})(); })();

View File

@ -486,7 +486,7 @@ export const State = {
channel = msg.params[0]; channel = msg.params[0];
if (client.isMyNick(msg.prefix.name)) { if (client.isMyNick(msg.prefix.name)) {
let [id, update] = State.createBuffer(state, channel, serverID, client); let [_id, update] = State.createBuffer(state, channel, serverID, client);
state = { ...state, ...update }; state = { ...state, ...update };
} }