diff --git a/lib/app.js b/lib/app.js index 72fc1bf848..afc4dc31fb 100644 --- a/lib/app.js +++ b/lib/app.js @@ -17,7 +17,7 @@ const { REQUEST_TIME } = require('./events'); module.exports = function (config) { const app = express(); - const baseUriPath = config.baseUriPath || ''; + const baseUriPath = config.baseUriPath || ''; const publicFolder = config.publicFolder; app.set('trust proxy'); diff --git a/lib/client-metrics/client-metrics.test.js b/lib/client-metrics/client-metrics.test.js index f80863a4c4..3cc6418b4c 100644 --- a/lib/client-metrics/client-metrics.test.js +++ b/lib/client-metrics/client-metrics.test.js @@ -152,7 +152,7 @@ test('should handle a lot of toggles', t => { const toggleCounts = {}; for (let i = 0; i < 100; i++) { - toggleCounts[`toggle${i}`] = { yes: i, no: i }; + toggleCounts[`toggle${i}`] = { yes: i, no: i }; } store.emit('metrics', { diff --git a/lib/client-metrics/index.js b/lib/client-metrics/index.js index 3067faf45c..eb0fc0148d 100644 --- a/lib/client-metrics/index.js +++ b/lib/client-metrics/index.js @@ -96,7 +96,7 @@ module.exports = class UnleashClientMetrics { this.lastMinuteList.add(toggles, stop); this.globalCount += count; - app.count += count; + app.count += count; this.addSeenToggles(app, toggleNames); } diff --git a/lib/client-metrics/list.js b/lib/client-metrics/list.js index 0e83c0abc7..a77859124f 100644 --- a/lib/client-metrics/list.js +++ b/lib/client-metrics/list.js @@ -75,7 +75,7 @@ module.exports = class List extends EventEmitter { // whole list is removed this.emit('evicted', cursor.value); this.start = null; - this.tail = null; + this.tail = null; // stop iteration cursor = null; } else if (result === true) { diff --git a/lib/db/db-pool.js b/lib/db/db-pool.js index e59be378d8..7fc9f3971f 100644 --- a/lib/db/db-pool.js +++ b/lib/db/db-pool.js @@ -1,6 +1,6 @@ 'use strict'; -const knex = require('knex'); +const knex = require('knex'); module.exports.createDb = function ({ databaseUrl, poolMin = 2, poolMax = 20, databaseSchema = 'public' }) { const db = knex({ diff --git a/lib/error/validate-request.js b/lib/error/validate-request.js index da9794f9c0..c7f07f56ac 100644 --- a/lib/error/validate-request.js +++ b/lib/error/validate-request.js @@ -12,4 +12,4 @@ function validateRequest (req) { }); } -module.exports = validateRequest; +module.exports = validateRequest; diff --git a/lib/event-differ.js b/lib/event-differ.js index 89b6112605..1c41e245a4 100644 --- a/lib/event-differ.js +++ b/lib/event-differ.js @@ -17,7 +17,7 @@ const strategyTypes = [ STRATEGY_UPDATED, ]; -const featureTypes = [ +const featureTypes = [ FEATURE_CREATED, FEATURE_UPDATED, FEATURE_ARCHIVED, @@ -61,7 +61,7 @@ function eachConsecutiveEvent (events, callback) { let i; let l; for (i = 0, l = currentEvents.length; i < l; i++) { - left = currentEvents[i]; + left = currentEvents[i]; right = currentEvents[i + 1]; callback(left, right); diff --git a/lib/event-differ.test.js b/lib/event-differ.test.js index 4dac913158..9082961db9 100644 --- a/lib/event-differ.test.js +++ b/lib/event-differ.test.js @@ -5,7 +5,7 @@ const eventDiffer = require('./event-differ'); const { FEATURE_CREATED, FEATURE_UPDATED } = require('./event-type'); const logger = require('./logger'); -test.beforeEach(() => { +test.beforeEach(() => { logger.setLevel('FATAL'); }); diff --git a/lib/events.js b/lib/events.js index bf49d8731d..ba1cb7926e 100644 --- a/lib/events.js +++ b/lib/events.js @@ -1,5 +1,5 @@ 'use strict'; -module.exports = { +module.exports = { REQUEST_TIME: 'request_time', }; diff --git a/lib/options.js b/lib/options.js index 1eafe98a3f..f6f63c28f5 100644 --- a/lib/options.js +++ b/lib/options.js @@ -15,7 +15,7 @@ const DEFAULT_OPTIONS = { module.exports = { createOptions: (opts) => { - const options = Object.assign({}, DEFAULT_OPTIONS, opts); + const options = Object.assign({}, DEFAULT_OPTIONS, opts); // If we are running in development we should assume local db if (isDev() && !options.databaseUrl) { diff --git a/lib/routes/feature.js b/lib/routes/feature.js index 5ab7ca2666..458ee98d1d 100644 --- a/lib/routes/feature.js +++ b/lib/routes/feature.js @@ -65,7 +65,7 @@ module.exports = function (app, config) { app.post('/features', (req, res) => { req.checkBody('name', 'Name is required').notEmpty(); req.checkBody('name', 'Name must match format ^[0-9a-zA-Z\\.\\-]+$').matches(/^[0-9a-zA-Z\\.\\-]+$/i); - const userName = extractUser(req); + const userName = extractUser(req); validateRequest(req) .then(validateFormat) diff --git a/lib/routes/metrics.js b/lib/routes/metrics.js index b80820fb4a..12ed0a7ad1 100644 --- a/lib/routes/metrics.js +++ b/lib/routes/metrics.js @@ -147,7 +147,7 @@ module.exports = function (app, config) { if (found) { return found; } - return { name, notFound: true }; + return { name, notFound: true }; }), instances, seenToggles: seenToggles.map(name => {