Merge pull request #171 from thelounge/xpaw/update-eslint
Update eslint to 2.3.0 and add stricter rules
This commit is contained in:
commit
f577da52a3
@ -8,19 +8,26 @@ env:
|
|||||||
node: true
|
node: true
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
|
block-spacing: [2, always]
|
||||||
comma-dangle: 0
|
comma-dangle: 0
|
||||||
curly: [2, multi-line]
|
curly: [2, multi-line]
|
||||||
eqeqeq: 2
|
eqeqeq: 2
|
||||||
indent: [2, tab]
|
indent: [2, tab]
|
||||||
|
keyword-spacing: [2, {before: true, after: true}]
|
||||||
linebreak-style: [2, unix]
|
linebreak-style: [2, unix]
|
||||||
object-curly-spacing: [2, never]
|
|
||||||
semi: [2, always]
|
|
||||||
space-after-keywords: [2, always]
|
|
||||||
space-before-function-paren: [2, never]
|
|
||||||
spaced-comment: [2, always]
|
|
||||||
no-console: 0
|
no-console: 0
|
||||||
|
no-inner-declarations: 2
|
||||||
|
no-invalid-regexp: 2
|
||||||
|
no-irregular-whitespace: 2
|
||||||
no-trailing-spaces: 2
|
no-trailing-spaces: 2
|
||||||
|
no-unexpected-multiline: 2
|
||||||
|
no-unreachable: 2
|
||||||
|
object-curly-spacing: [2, never]
|
||||||
quotes: [2, double, avoid-escape]
|
quotes: [2, double, avoid-escape]
|
||||||
|
semi: [2, always]
|
||||||
|
space-before-blocks: 2
|
||||||
|
space-infix-ops: 2
|
||||||
|
spaced-comment: [2, always]
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
$: false
|
$: false
|
@ -802,7 +802,7 @@ $(function() {
|
|||||||
"nick",
|
"nick",
|
||||||
"mode",
|
"mode",
|
||||||
];
|
];
|
||||||
if ($.inArray(msg.type, ignore) !== -1){
|
if ($.inArray(msg.type, ignore) !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -994,16 +994,16 @@ $(function() {
|
|||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDesktopNotificationStatus(){
|
function updateDesktopNotificationStatus() {
|
||||||
var checkbox = $("#desktopNotifications");
|
var checkbox = $("#desktopNotifications");
|
||||||
var warning = $("#warnDisabledDesktopNotifications");
|
var warning = $("#warnDisabledDesktopNotifications");
|
||||||
|
|
||||||
if (Notification.permission === "denied"){
|
if (Notification.permission === "denied") {
|
||||||
checkbox.attr("disabled", true);
|
checkbox.attr("disabled", true);
|
||||||
checkbox.attr("checked", false);
|
checkbox.attr("checked", false);
|
||||||
warning.show();
|
warning.show();
|
||||||
} else {
|
} else {
|
||||||
if (Notification.permission === "default" && checkbox.prop("checked")){
|
if (Notification.permission === "default" && checkbox.prop("checked")) {
|
||||||
checkbox.attr("checked", false);
|
checkbox.attr("checked", false);
|
||||||
}
|
}
|
||||||
checkbox.attr("disabled", false);
|
checkbox.attr("disabled", false);
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"stylelint": "4.3.3",
|
"stylelint": "4.3.3",
|
||||||
"eslint": "^1.5.1",
|
"eslint": "2.3.0",
|
||||||
"grunt": "0.4.5",
|
"grunt": "0.4.5",
|
||||||
"grunt-cli": "0.1.13",
|
"grunt-cli": "0.1.13",
|
||||||
"grunt-contrib-uglify": "0.11.1",
|
"grunt-contrib-uglify": "0.11.1",
|
||||||
|
@ -27,7 +27,7 @@ module.exports = function(options) {
|
|||||||
var host = config.host;
|
var host = config.host;
|
||||||
var transports = config.transports || ["websocket", "polling"];
|
var transports = config.transports || ["websocket", "polling"];
|
||||||
|
|
||||||
if (!https.enable){
|
if (!https.enable) {
|
||||||
server = require("http");
|
server = require("http");
|
||||||
server = server.createServer(app).listen(port, host);
|
server = server.createServer(app).listen(port, host);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user