aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/common
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-10 17:21:38 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-10 17:21:47 +0200
commitab4f18fbeba4cc4a8db3371008e0dbb29c99f10b (patch)
treec871458807e114007e73970c6cd14d9e6bbcb1d9 /server/sonar-web/src/main/js/components/common
parentcbf5602a23ce9138b62c593d4e290566eaf97522 (diff)
downloadsonarqube-ab4f18fbeba4cc4a8db3371008e0dbb29c99f10b.tar.gz
sonarqube-ab4f18fbeba4cc4a8db3371008e0dbb29c99f10b.zip
improve code quality
Diffstat (limited to 'server/sonar-web/src/main/js/components/common')
-rw-r--r--server/sonar-web/src/main/js/components/common/handlebars-extensions.js7
-rw-r--r--server/sonar-web/src/main/js/components/common/jquery-isolated-scroll.js21
2 files changed, 5 insertions, 23 deletions
diff --git a/server/sonar-web/src/main/js/components/common/handlebars-extensions.js b/server/sonar-web/src/main/js/components/common/handlebars-extensions.js
index c85329a0535..557e883f087 100644
--- a/server/sonar-web/src/main/js/components/common/handlebars-extensions.js
+++ b/server/sonar-web/src/main/js/components/common/handlebars-extensions.js
@@ -19,6 +19,7 @@
*/
(function () {
Handlebars.registerHelper('log', function () {
+ /* eslint no-console: 0 */
var args = Array.prototype.slice.call(arguments, 0, -1);
console.log.apply(console, args);
});
@@ -198,12 +199,12 @@
});
Handlebars.registerHelper('eq', function (v1, v2, options) {
- // use `==` instead of `===` to ignore types
+ /* eslint eqeqeq: 0 */
return v1 == v2 ? options.fn(this) : options.inverse(this);
});
Handlebars.registerHelper('notEq', function (v1, v2, options) {
- // use `==` instead of `===` to ignore types
+ /* eslint eqeqeq: 0 */
return v1 != v2 ? options.fn(this) : options.inverse(this);
});
@@ -315,7 +316,7 @@
return ret;
});
- Handlebars.registerHelper('sum', function (a, b) {
+ Handlebars.registerHelper('sum', function () {
var args = Array.prototype.slice.call(arguments, 0, -1);
return args.reduce(function (p, c) {
return p + +c;
diff --git a/server/sonar-web/src/main/js/components/common/jquery-isolated-scroll.js b/server/sonar-web/src/main/js/components/common/jquery-isolated-scroll.js
index e65a9c61541..2733b2a7359 100644
--- a/server/sonar-web/src/main/js/components/common/jquery-isolated-scroll.js
+++ b/server/sonar-web/src/main/js/components/common/jquery-isolated-scroll.js
@@ -1,23 +1,4 @@
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-;(function ($) {
+(function ($) {
$.fn.isolatedScroll = function () {
this.on('wheel', function (e) {