From 64a632200251e98f0a57a8d6f51dc0544da1b4b7 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Sat, 18 Feb 2017 12:51:13 -0700
Subject: [PATCH] ESlint no-extra-boolean-cast and no-shadow-restricted-names
---
.eslintrc | 6 +++---
app.js | 2 +-
public/src/app.js | 2 +-
public/src/overrides.js | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index 4d7e913688..3ba166a274 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -47,7 +47,7 @@
"vars-on-top": "off",
"no-restricted-syntax": "off",
"no-shadow": "off",
- // "no-script-url": "off",
+ "no-script-url": "off",
// "linebreak-style": "off",
// "one-var": "off",
@@ -89,8 +89,8 @@
"no-unneeded-ternary": "off",
"no-sequences": "off",
"no-extend-native": "off",
- "no-shadow-restricted-names": "off",
- "no-extra-boolean-cast": "off",
+ // "no-shadow-restricted-names": "off",
+ // "no-extra-boolean-cast": "off",
// "no-path-concat": "off",
// "no-unused-expressions": "off",
// "no-return-assign": "off",
diff --git a/app.js b/app.js
index 31ae60bccf..de9d417045 100644
--- a/app.js
+++ b/app.js
@@ -36,7 +36,7 @@ winston.add(winston.transports.Console, {
colorize: true,
timestamp: function () {
var date = new Date();
- return (!!nconf.get('json-logging')) ? date.toJSON() : date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0, 8) + ' [' + global.process.pid + ']';
+ return nconf.get('json-logging') ? date.toJSON() : date.getDate() + '/' + (date.getMonth() + 1) + ' ' + date.toTimeString().substr(0, 8) + ' [' + global.process.pid + ']';
},
level: nconf.get('log-level') || (global.env === 'production' ? 'info' : 'verbose'),
json: (!!nconf.get('json-logging')),
diff --git a/public/src/app.js b/public/src/app.js
index 4da97aee00..e38f49178e 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -425,7 +425,7 @@ app.cacheBuster = null;
app.toggleNavbar = function (state) {
var navbarEl = $('.navbar');
if (navbarEl) {
- navbarEl.toggleClass('hidden', !!!state);
+ navbarEl.toggleClass('hidden', !state);
}
};
diff --git a/public/src/overrides.js b/public/src/overrides.js
index 262b6bcb02..e1e192274a 100644
--- a/public/src/overrides.js
+++ b/public/src/overrides.js
@@ -4,7 +4,7 @@
var overrides = overrides || {};
if ('undefined' !== typeof window) {
- (function ($, undefined) {
+ (function ($) {
require(['translator'], function (translator) {
$.fn.getCursorPosition = function () {
var el = $(this).get(0);