From 9ce3d44cc6045e06c15142759854e3b21c453957 Mon Sep 17 00:00:00 2001 From: Guillaume Martigny Date: Wed, 1 Feb 2017 15:51:13 +0100 Subject: [PATCH 1/3] Add config file for CodeClimate --- .codeclimate.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 00000000..f4c9a286 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,24 @@ +engines: + csslint: + enabled: true + duplication: + enabled: true + config: + languages: + - javascript + eslint: + enabled: true + checks: + wrap-iife: + enabled: false + fixme: + enabled: true +ratings: + paths: + - "**.css" + - "**.js" +exclude_paths: + - .github/ + - bin/ + - misc/ + - test/ \ No newline at end of file From f5491dc55791bf426ff0cff6f4c06e2f8453a657 Mon Sep 17 00:00:00 2001 From: Guillaume Martigny Date: Wed, 1 Feb 2017 16:12:32 +0100 Subject: [PATCH 2/3] Irregular whitespace --- src/js/controller/PalettesListController.js | 2 +- src/js/controller/settings/ApplicationSettingsController.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/controller/PalettesListController.js b/src/js/controller/PalettesListController.js index 04abdd3e..d3c722ed 100644 --- a/src/js/controller/PalettesListController.js +++ b/src/js/controller/PalettesListController.js @@ -100,7 +100,7 @@ ns.PalettesListController.prototype.getCurrentColorIndex_ = function () { var currentIndex = 0; var selectedColor = document.querySelector('.' + PRIMARY_COLOR_CLASSNAME); - if (selectedColor) { + if (selectedColor) { currentIndex = parseInt(selectedColor.dataset.colorIndex, 10); } return currentIndex; diff --git a/src/js/controller/settings/ApplicationSettingsController.js b/src/js/controller/settings/ApplicationSettingsController.js index 9c604a4f..93d71ca4 100644 --- a/src/js/controller/settings/ApplicationSettingsController.js +++ b/src/js/controller/settings/ApplicationSettingsController.js @@ -87,7 +87,7 @@ if (background) { pskl.UserSettings.set(pskl.UserSettings.CANVAS_BACKGROUND, background); var selected = this.backgroundContainer.querySelector('.selected'); - if (selected) { + if (selected) { selected.classList.remove('selected'); } target.classList.add('selected'); From 8959b201e950d5a581cba807ea6419ffee04c111 Mon Sep 17 00:00:00 2001 From: Guillaume Martigny Date: Wed, 1 Feb 2017 16:17:38 +0100 Subject: [PATCH 3/3] Excludes lib from linting --- .codeclimate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index f4c9a286..9d38b484 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -21,4 +21,5 @@ exclude_paths: - .github/ - bin/ - misc/ + - src/js/lib/ - test/ \ No newline at end of file