Fix JSHint errors

This commit is contained in:
Rowan Manning
2016-04-25 21:17:03 +01:00
parent d766029bbb
commit 90328cfa39
19 changed files with 44 additions and 76 deletions

View File

@@ -83,7 +83,6 @@
"excludeFiles": [ "excludeFiles": [
"coverage", "coverage",
"node_modules", "node_modules",
"public/js/site.min.js", "public/js"
"public/js/vendor"
] ]
} }

View File

@@ -1,4 +1,3 @@
coverage coverage
node_modules node_modules
public/js/site.min.js public/js
public/js/vendor

8
app.js
View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
@@ -29,7 +29,7 @@ function initApp (config, callback) {
config = defaultConfig(config); config = defaultConfig(config);
var webserviceUrl = config.webservice; var webserviceUrl = config.webservice;
if (typeof webserviceUrl == 'object') { if (typeof webserviceUrl === 'object') {
webserviceUrl = 'http://' + webserviceUrl.host + ':' + webserviceUrl.port + '/'; webserviceUrl = 'http://' + webserviceUrl.host + ':' + webserviceUrl.port + '/';
} }

View File

@@ -1,21 +1,20 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict'; 'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task'); var presentTask = require('../../view/presenter/task');
module.exports = route; module.exports = route;

View File

@@ -15,7 +15,6 @@
'use strict'; 'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task'); var presentTask = require('../../view/presenter/task');
var getStandards = require('../../data/standards'); var getStandards = require('../../data/standards');

View File

@@ -1,9 +1,5 @@
'use strict'; 'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task');
var getStandards = require('../../data/standards');
module.exports = route; module.exports = route;
// Route definition // Route definition

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
@@ -21,7 +21,7 @@ module.exports = route;
function route (app) { function route (app) {
app.express.get('/:id/run', function (req, res, next) { app.express.get('/:id/run', function (req, res, next) {
app.webservice.task(req.params.id).run(function (err, task) { app.webservice.task(req.params.id).run(function (err) {
if (err) { if (err) {
return next(); return next();
} }

View File

@@ -1,9 +1,5 @@
'use strict'; 'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task');
var getStandards = require('../../data/standards');
module.exports = route; module.exports = route;
// Route definition // Route definition

View File

@@ -1,15 +1,15 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
@@ -22,7 +22,7 @@ module.exports = createWebserviceClient;
// Create a webservice client // Create a webservice client
function createWebserviceClient (config) { function createWebserviceClient (config) {
var webserviceUrl = config.webservice; var webserviceUrl = config.webservice;
if (typeof webserviceUrl == 'object') { if (typeof webserviceUrl === 'object') {
webserviceUrl = 'http://' + webserviceUrl.host + ':' + webserviceUrl.port + '/'; webserviceUrl = 'http://' + webserviceUrl.host + ':' + webserviceUrl.port + '/';
} }
return createClient(webserviceUrl); return createClient(webserviceUrl);

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');
@@ -132,4 +130,3 @@ describe('POST /<task-id>/edit', function () {
}); });
}); });

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -1,20 +1,18 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var assert = require('proclaim'); var assert = require('proclaim');

View File

@@ -13,8 +13,6 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global afterEach, before */
/* jshint maxlen: false, maxstatements: false */
'use strict'; 'use strict';
var config = require('../../config/test.json'); var config = require('../../config/test.json');

View File

@@ -1,21 +1,20 @@
// This file is part of pa11y-dashboard. // This file is part of pa11y-dashboard.
// //
// pa11y-dashboard is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or // the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version. // (at your option) any later version.
// //
// pa11y-dashboard is distributed in the hope that it will be useful, // pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>. // along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict'; 'use strict';
var _ = require('underscore');
var presentIgnoreRules = require('./ignore'); var presentIgnoreRules = require('./ignore');
var presentResult = require('./result'); var presentResult = require('./result');