From 66c97261c8f1d231731a7f1ed44c3c3d09ff6468 Mon Sep 17 00:00:00 2001 From: Jon Winton Date: Thu, 31 Aug 2017 11:09:03 -0400 Subject: [PATCH] linting error cleanups --- lib/auth.js | 1 - lib/routes.js | 10 +++++----- lib/routes/components.js | 5 +---- test/api/render/index.test.js | 5 +---- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/auth.js b/lib/auth.js index 9d78d615..ccbec67a 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -8,7 +8,6 @@ const _ = require('lodash'), flash = require('express-flash'), responses = require('./responses'), handlebars = require('handlebars'), - sites = require('./services/sites'), basicAuth = require('basic-auth'), fs = require('fs'), path = require('path'), diff --git a/lib/routes.js b/lib/routes.js index eb4e1448..19d8f1ba 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -206,9 +206,8 @@ function addSiteController(router, site, providers) { /** * @param {express.Router} router - * @param {array} providers - * @param {object} sessionStore - * @param {object} site + * @param {Object} options + * @param {Object} site */ function addSite(router, { providers, sessionStore, cacheControl = {} }, site) { site = _.defaults(site, { path: '/' }); // If path isn't explicitly set, set it. @@ -327,8 +326,9 @@ function addHost(options) { /** * @param {express.Router} router Often an express app. - * @param {array} [providers] - * @param {object} [sessionStore] + * @param {Array} [providers] + * @param {Object} [sessionStore] + * @param {Object} [cacheControl] * @returns {*} * @example * var app = express(); diff --git a/lib/routes/components.js b/lib/routes/components.js index 3eae7982..22095eb7 100644 --- a/lib/routes/components.js +++ b/lib/routes/components.js @@ -12,10 +12,7 @@ const _ = require('lodash'), files = require('../files'), queryStringOptions = ['ignore-data'], { withAuthLevel, authLevels } = require('../auth'), - controller = require('../services/components'), - acceptedExtensions = { - json: 'application/json' - }; + controller = require('../services/components'); let validation, route; diff --git a/test/api/render/index.test.js b/test/api/render/index.test.js index d5b62664..c9f99eac 100644 --- a/test/api/render/index.test.js +++ b/test/api/render/index.test.js @@ -1,10 +1,7 @@ 'use strict'; -const _ = require('lodash'), - expect = require('chai').expect, - sinon = require('sinon'), +const sinon = require('sinon'), render = require('../../../lib/render'), - responses = require('../../../lib/responses'), componentsRoutes = require('../../../lib/routes/components'), pagesRoutes = require('../../../lib/routes/pages');