Enable .js linter

This commit is contained in:
Pavel Djundik 2018-07-10 12:40:55 +03:00 committed by Pavel Djundik
parent db803a8548
commit 5f5b5fef3d
11 changed files with 18 additions and 23 deletions

View file

@ -1,6 +1,8 @@
<template>
<span v-if="channel.data.text">{{channel.data.text}}</span>
<table v-else class="channel-list">
<span v-if="channel.data.text">{{ channel.data.text }}</span>
<table
v-else
class="channel-list">
<thead>
<tr>
<th class="channel">Channel</th>

View file

@ -80,7 +80,7 @@ function handleKeybinds(networks) {
const existingChannel = utils.findCurrentNetworkChan(channel);
if (existingChannel) {
$(`#sidebar .chan[data-id="${chan.id}"]`).trigger("click");
$(`#sidebar .chan[data-id="${existingChannel.id}"]`).trigger("click");
} else {
socket.emit("input", {
text: `/join ${channel} ${key}`,

View file

@ -149,8 +149,8 @@ window.vueMounted = () => {
let hasAnyHighlights = false;
for (const network of vueApp.networks) {
for (const channel of network.channels) {
if (channel.highlight > 0) {
for (const chan of network.channels) {
if (chan.highlight > 0) {
hasAnyHighlights = true;
break;
}

View file

@ -96,9 +96,6 @@ function processReceivedMessage(data) {
}
function notifyMessage(targetId, channel, msg) {
const serverUnread = msg.unread;
const serverHighlight = msg.highlight;
msg = msg.msg;
if (msg.self) {

View file

@ -1,8 +1,7 @@
"use strict";
const socket = require("../socket");
const render = require("../render");
const {vueApp, findChannel} = require("../vue");
const {findChannel} = require("../vue");
socket.on("names", function(data) {
const channel = findChannel(data.id);

View file

@ -1,6 +1,5 @@
"use strict";
const $ = require("jquery");
const socket = require("../socket");
const utils = require("../utils");
const {vueApp, findChannel} = require("../vue");

View file

@ -1,6 +1,5 @@
"use strict";
const $ = require("jquery");
const socket = require("../socket");
const {vueApp, findChannel} = require("../vue");

View file

@ -44,14 +44,14 @@ const vueApp = new Vue({
userStyles: "",
},
},
mounted() {
Vue.nextTick(() => window.vueMounted());
},
render(createElement) {
return createElement(App, {
props: this,
});
},
mounted() {
Vue.nextTick(() => window.vueMounted());
}
});
function findChannel(id) {

View file

@ -31,10 +31,10 @@ module.exports = function(irc, network) {
const chanName = `Banlist for ${channel}`;
let chan = network.getChannel(chanName);
const data = bans.map((data) => ({
hostmask: data.banned,
banned_by: data.banned_by,
banned_at: data.banned_at * 1000,
const data = bans.map((ban) => ({
hostmask: ban.banned,
banned_by: ban.banned_by,
banned_at: ban.banned_at * 1000,
}));
if (typeof chan === "undefined") {

View file

@ -1,7 +1,6 @@
"use strict";
const Chan = require("../../models/chan");
const Msg = require("../../models/msg");
module.exports = function(irc, network) {
const client = this;

View file

@ -145,12 +145,12 @@ const config = {
port: 9001,
proxy: {
"/": {
context: ['**', '!/css/**', '!/js/**'],
target: 'http://localhost:9000/',
context: ["**", "!/css/**", "!/js/**"],
target: "http://localhost:9000/",
},
"/socket.io": {
ws: true,
target: 'http://localhost:9000',
target: "http://localhost:9000",
},
},
},