Merge pull request #975 from thelounge/xpaw/enforce-more-spaces

Enforce more space and new line rules
This commit is contained in:
Jérémie Astori 2017-03-27 19:24:39 -04:00 committed by GitHub
commit 993a7bcbde
6 changed files with 3 additions and 8 deletions

View File

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

View File

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

View File

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

View File

@ -96,7 +96,6 @@ ClientManager.prototype.addUser = function(name, password, enableLog) {
return false; return false;
} }
try { try {
if (require("path").basename(name) !== name) { if (require("path").basename(name) !== name) {
throw new Error(name + " is an invalid username."); 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"); const localetime = require("../../../../../client/js/libs/handlebars/localetime");
describe("localetime Handlebars helper", () => { describe("localetime Handlebars helper", () => {
it("should render a human-readable date", () => { it("should render a human-readable date", () => {
// 12PM in UTC time // 12PM in UTC time
const date = new Date("2014-05-22T12:00:00"); 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"); 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("Network", function() {
describe("#export()", function() { describe("#export()", function() {
it("should produce an valid object", function() { it("should produce an valid object", function() {
var network = new Network({ var network = new Network({
name: "networkName", name: "networkName",