From dd008f0895c2eeb03d463d7cc632f6c5ddfe8900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Sat, 12 May 2018 13:19:03 +0200 Subject: [PATCH] Use single quotes and update krankerl.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/controller/BoardController.js | 10 +++++----- js/filters/iconWhiteFilter.js | 6 +++--- js/filters/lightenColorFilter.js | 6 +++--- js/filters/textColorFilter.js | 6 +++--- js/init.js | 2 +- js/service/ApiService.js | 2 +- krankerl.toml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/js/controller/BoardController.js b/js/controller/BoardController.js index 657d742e3..2d2d1e374 100644 --- a/js/controller/BoardController.js +++ b/js/controller/BoardController.js @@ -153,7 +153,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St // Create a new Stack $scope.createStack = function () { StackService.create($scope.newStack).then(function (data) { - $scope.newStack.title = ""; + $scope.newStack.title = ''; }); }; @@ -165,7 +165,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St }; CardService.create(newCard).then(function (data) { $scope.stackservice.addCard(data); - $scope.newCard.title = ""; + $scope.newCard.title = ''; }); }; @@ -198,7 +198,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St $scope.labelCreate = function (label) { label.boardId = $scope.id; LabelService.create(label).then(function (data) { - $scope.newStack.title = ""; + $scope.newStack.title = ''; BoardService.getCurrent().labels.push(data); $scope.status.createLabel = false; $scope.newLabel = {}; @@ -274,7 +274,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St // auto scroll on drag dragMove: function (itemPosition, containment, eventObj) { if (eventObj) { - var container = $("#board"); + var container = $('#board'); var offset = container.offset(); var targetX = eventObj.pageX - (offset.left || container.scrollLeft()); var targetY = eventObj.pageY - (offset.top || container.scrollTop()); @@ -309,7 +309,7 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St containment: '#innerBoard', dragMove: function (itemPosition, containment, eventObj) { if (eventObj) { - var container = $("#board"); + var container = $('#board'); var offset = container.offset(); var targetX = eventObj.pageX - (offset.left || container.scrollLeft()); var targetY = eventObj.pageY - (offset.top || container.scrollTop()); diff --git a/js/filters/iconWhiteFilter.js b/js/filters/iconWhiteFilter.js index 678eea7c9..0a699ce13 100644 --- a/js/filters/iconWhiteFilter.js +++ b/js/filters/iconWhiteFilter.js @@ -32,7 +32,7 @@ app.filter('iconWhiteFilter', function () { b: parseInt(result[3], 16) } : null; if (result === null) { - return ""; + return ''; } var r = color.r / 255; var g = color.g / 255; @@ -59,9 +59,9 @@ app.filter('iconWhiteFilter', function () { h /= 6; } if (l < 0.5) { - return "-white"; + return '-white'; } else { - return ""; + return ''; } }; }); diff --git a/js/filters/lightenColorFilter.js b/js/filters/lightenColorFilter.js index c5e433e2f..770866ed6 100644 --- a/js/filters/lightenColorFilter.js +++ b/js/filters/lightenColorFilter.js @@ -30,9 +30,9 @@ app.filter('lightenColorFilter', function() { b: parseInt(result[3], 16) } : null; if (result !== null) { - return "rgba(" + color.r + "," + color.g + "," + color.b + ",0.7)"; + return 'rgba(' + color.r + ',' + color.g + ',' + color.b + ',0.7)'; } else { - return "#" + hex; + return '#' + hex; } }; -}); \ No newline at end of file +}); diff --git a/js/filters/textColorFilter.js b/js/filters/textColorFilter.js index 2ac218a8f..c2bb5bccb 100644 --- a/js/filters/textColorFilter.js +++ b/js/filters/textColorFilter.js @@ -57,12 +57,12 @@ app.filter('textColorFilter', function () { h /= 6; } if (l < 0.5) { - return "#ffffff"; + return '#ffffff'; } else { - return "#000000"; + return '#000000'; } } else { - return "#000000"; + return '#000000'; } }; diff --git a/js/init.js b/js/init.js index 3b641eaf9..c9d71bdab 100644 --- a/js/init.js +++ b/js/init.js @@ -17,7 +17,7 @@ app.controller('ListController', ListController); // require all the js files from subdirectories -var context = require.context(".", true, /(controller|service|filters|directive)\/(.*)\.js$/); +var context = require.context('.', true, /(controller|service|filters|directive)\/(.*)\.js$/); context.keys().forEach(function (key) { context(key); diff --git a/js/service/ApiService.js b/js/service/ApiService.js index a2a2da21a..ab9ea0aa6 100644 --- a/js/service/ApiService.js +++ b/js/service/ApiService.js @@ -166,7 +166,7 @@ app.factory('ApiService', function ($http, $q) { ApiService.prototype.getName = function () { var funcNameRegex = /function (.{1,})\(/; var results = (funcNameRegex).exec((this).constructor.toString()); - return (results && results.length > 1) ? results[1] : ""; + return (results && results.length > 1) ? results[1] : ''; }; return ApiService; diff --git a/krankerl.toml b/krankerl.toml index f6ebf8253..3d36507c2 100644 --- a/krankerl.toml +++ b/krankerl.toml @@ -4,6 +4,7 @@ exclude = [ ".git", "js/node_modules", "js/tests", + "js/legacy", "js/controller", "js/directive", "js/filters", @@ -14,7 +15,6 @@ exclude = [ "js/Gruntfile.js", "js/package.json", "js/package-lock.json", - "js/vendor/jquery", "tests", ".codecov.yml", "composer.json",