mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 14:44:13 +00:00
Stricter eslint rule for curly brackets
This commit is contained in:
parent
c6c32e7d5f
commit
e75a8f40a6
6 changed files with 25 additions and 13 deletions
|
@ -9,8 +9,9 @@ env:
|
|||
|
||||
rules:
|
||||
block-spacing: [2, always]
|
||||
brace-style: [2, 1tbs]
|
||||
comma-dangle: 0
|
||||
curly: [2, multi-line]
|
||||
curly: [2, all]
|
||||
eqeqeq: 2
|
||||
indent: [2, tab]
|
||||
keyword-spacing: [2, {before: true, after: true}]
|
||||
|
|
|
@ -46,7 +46,9 @@ $(function() {
|
|||
};
|
||||
}
|
||||
|
||||
$("#play").on("click", function() { pop.play(); });
|
||||
$("#play").on("click", function() {
|
||||
pop.play();
|
||||
});
|
||||
|
||||
$(".tse-scrollable").TrackpadScrollEmulator();
|
||||
|
||||
|
@ -193,7 +195,9 @@ $(function() {
|
|||
);
|
||||
renderChannel(data.chan);
|
||||
var chan = sidebar.find(".chan")
|
||||
.sort(function(a, b) { return $(a).data("id") - $(b).data("id"); })
|
||||
.sort(function(a, b) {
|
||||
return $(a).data("id") - $(b).data("id");
|
||||
})
|
||||
.last();
|
||||
if (!whois) {
|
||||
chan = chan.filter(":not(.query)");
|
||||
|
@ -422,8 +426,7 @@ $(function() {
|
|||
socket.emit("names", {
|
||||
target: data.chan
|
||||
});
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
chan.data("needsNamesRefresh", true);
|
||||
}
|
||||
});
|
||||
|
@ -552,8 +555,7 @@ $(function() {
|
|||
text: target.text(),
|
||||
data: target.data("name")
|
||||
});
|
||||
}
|
||||
else if (target.hasClass("chan")) {
|
||||
} else if (target.hasClass("chan")) {
|
||||
output = render("contextmenu_item", {
|
||||
class: "chan",
|
||||
text: target.data("title"),
|
||||
|
|
|
@ -36,7 +36,9 @@ program
|
|||
prompt: "[thelounge] Enter password: ",
|
||||
silent: true
|
||||
}, function(err, password) {
|
||||
if (!err) add(manager, name, password);
|
||||
if (!err) {
|
||||
add(manager, name, password);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -79,8 +79,7 @@ function parse(msg, url, res, client) {
|
|||
case "image/jpeg":
|
||||
if (res.size < (config.prefetchMaxImageSize * 1024)) {
|
||||
toggle.type = "image";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -122,7 +121,10 @@ function fetch(url, cb) {
|
|||
next(null, data);
|
||||
}))
|
||||
.pipe(es.wait(function(err, data) {
|
||||
if (err) return;
|
||||
if (err) {
|
||||
return;
|
||||
}
|
||||
|
||||
var body;
|
||||
var type;
|
||||
var size = req.response.headers["content-length"];
|
||||
|
|
|
@ -74,7 +74,10 @@ module.exports = function(options) {
|
|||
};
|
||||
|
||||
function index(req, res, next) {
|
||||
if (req.url.split("?")[0] !== "/") return next();
|
||||
if (req.url.split("?")[0] !== "/") {
|
||||
return next();
|
||||
}
|
||||
|
||||
return fs.readFile("client/index.html", "utf-8", function(err, file) {
|
||||
var data = _.merge(
|
||||
package,
|
||||
|
|
|
@ -11,7 +11,9 @@ function makeUser(name) {
|
|||
}
|
||||
|
||||
function getUserNames(chan) {
|
||||
return chan.users.map(function(u) { return u.name; });
|
||||
return chan.users.map(function(u) {
|
||||
return u.name;
|
||||
});
|
||||
}
|
||||
|
||||
describe("Chan", function() {
|
||||
|
|
Loading…
Reference in a new issue