Enforce more space and new line rules

This commit is contained in:
Pavel Djundik 2017-03-18 21:40:39 +02:00
parent 52cc3ee909
commit 3b2e3fc08c
6 changed files with 3 additions and 8 deletions

View File

@ -27,6 +27,7 @@ rules:
no-else-return: 2
no-implicit-globals: 2
no-multi-spaces: 2
no-multiple-empty-lines: [2, { "max": 1 }]
no-shadow: 2
no-template-curly-in-string: 2
no-trailing-spaces: 2
@ -34,11 +35,13 @@ rules:
no-useless-escape: 2
no-useless-return: 2
object-curly-spacing: [2, never]
padded-blocks: [2, never]
quote-props: [2, as-needed]
quotes: [2, double, avoid-escape]
semi: [2, always]
space-before-blocks: 2
space-before-function-paren: [2, never]
space-in-parens: [2, never]
space-infix-ops: 2
spaced-comment: [2, always]
strict: 2

View File

@ -49,7 +49,6 @@ var styleCheck_Re = /[\x00-\x1F]/,
// breaks all open styles ^O (\x0F)
styleBreak = "\x0F";
function styleTemplate(settings) {
return "<span class='" + settings.style + "'>" + settings.text + "</span>";
}

View File

@ -364,7 +364,6 @@ $(function() {
lastDate = msgDate;
});
}
}
function renderChannelUsers(data) {
@ -498,7 +497,6 @@ $(function() {
lastDate = msgDate;
});
});
socket.on("network", function(data) {
@ -1168,7 +1166,6 @@ $(function() {
} catch (exception) {
// `new Notification(...)` is not supported and should be silenced.
}
}
}
}

View File

@ -96,7 +96,6 @@ ClientManager.prototype.addUser = function(name, password, enableLog) {
return false;
}
try {
if (require("path").basename(name) !== name) {
throw new Error(name + " is an invalid username.");
}

View File

@ -4,7 +4,6 @@ const expect = require("chai").expect;
const localetime = require("../../../../../client/js/libs/handlebars/localetime");
describe("localetime Handlebars helper", () => {
it("should render a human-readable date", () => {
// 12PM in UTC time
const date = new Date("2014-05-22T12:00:00");
@ -17,5 +16,4 @@ describe("localetime Handlebars helper", () => {
expect(localetime(time)).to.equal("5/22/2014, 12:00:00 PM");
});
});

View File

@ -8,7 +8,6 @@ var Network = require("../../src/models/network");
describe("Network", function() {
describe("#export()", function() {
it("should produce an valid object", function() {
var network = new Network({
name: "networkName",