From 3cdbba00c118a16feac732672baa2c385da082db Mon Sep 17 00:00:00 2001 From: Alex Kilgour Date: Tue, 26 Jan 2016 14:04:12 +0000 Subject: [PATCH] Fix linting errors in the Javascript --- Gruntfile.js | 8 ++++---- public/js/site.js | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9aa06b6..a185182 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,15 +1,15 @@ // This file is part of pa11y-dashboard. -// +// // pa11y-dashboard is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // pa11y-dashboard 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 General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with pa11y-dashboard. If not, see . @@ -28,7 +28,7 @@ module.exports = function (grunt) { es3: false, indent: 4, latedef: false, - maxcomplexity: 4, + maxcomplexity: 6, maxdepth: 2, maxlen: 100, maxparams: 4, diff --git a/public/js/site.js b/public/js/site.js index d4606e2..46026e3 100644 --- a/public/js/site.js +++ b/public/js/site.js @@ -72,7 +72,7 @@ $(document).ready(function(){ $(this).parent().toggleClass('showing'); }); - // Back to top links + // Back to top links toTopLinks.click( function(e){ e.preventDefault(); $(animateSection($('#top'), -55)); @@ -304,9 +304,13 @@ $(document).ready(function(){ e.preventDefault(); e.stopPropagation(); - } + }; $('[data-toggle="collapse"]').attr('role', 'button').attr('tabindex', 0); - $(document).on('keydown.collapse.data-api', '[data-toggle="collapse"]' , $.fn.collapse.Constructor.prototype.keydown); + $(document).on( + 'keydown.collapse.data-api', + '[data-toggle="collapse"]', + $.fn.collapse.Constructor.prototype.keydown + ); });