From 119e091de499f543b6c679004dc6dbcdfff478f3 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 26 Oct 2016 10:43:11 +0200 Subject: [PATCH] Upgrade and fix lint --- lerna.json | 2 +- package.json | 10 +++++----- packages/unleash-api/app.js | 1 + packages/unleash-api/lib/db/dbPool.js | 1 + packages/unleash-api/lib/db/event.js | 1 + packages/unleash-api/lib/db/feature.js | 1 + packages/unleash-api/lib/db/strategy.js | 1 + packages/unleash-api/lib/error/NameExistsError.js | 1 + packages/unleash-api/lib/error/NotFoundError.js | 1 + packages/unleash-api/lib/error/ValidationError.js | 1 + packages/unleash-api/lib/error/validateRequest.js | 1 + packages/unleash-api/lib/eventDiffer.js | 1 + packages/unleash-api/lib/eventStore.js | 1 + packages/unleash-api/lib/eventType.js | 1 + packages/unleash-api/lib/extractUser.js | 1 + packages/unleash-api/lib/logger.js | 1 + packages/unleash-api/lib/routes/event.js | 1 + packages/unleash-api/lib/routes/feature-archive.js | 1 + packages/unleash-api/lib/routes/feature.js | 1 + packages/unleash-api/lib/routes/health-check.js | 1 + packages/unleash-api/lib/routes/strategy.js | 1 + .../migrations/20141020151056-initial-schema.js | 1 + .../20141110144153-add-description-to-features.js | 1 + ...1117200435-add-parameters-template-to-strategies.js | 1 + .../20141117202209-insert-default-strategy.js | 1 + .../20141118071458-default-strategy-event.js | 1 + .../20141215210141-005-archived-flag-to-features.js | 1 + .../migrations/20150210152531-006-rename-eventtype.js | 1 + .../20160618193924-add-strategies-to-features.js | 1 + packages/unleash-api/scripts/migration-runner.js | 1 + packages/unleash-api/server-impl.js | 1 + packages/unleash-api/test/e2e/databaseConfig.js | 1 + packages/unleash-api/test/e2e/eventApiSpec.js | 1 + packages/unleash-api/test/e2e/featureApiSpec.js | 1 + packages/unleash-api/test/e2e/featureArchiveApiSpec.js | 1 + packages/unleash-api/test/e2e/routerSpec.js | 1 + packages/unleash-api/test/e2e/specHelper.js | 1 + packages/unleash-api/test/e2e/strategyApiSpec.js | 1 + packages/unleash-api/test/unit/eventDiffer.test.js | 1 + .../test/unit/helper/legacy-feature-mapper.test.js | 1 + packages/unleash-docker/index.js | 1 + packages/unleash-frontend-next/index.js | 1 + .../src/component/feature/configure-strategy.jsx | 8 +++++--- packages/unleash-frontend-next/webpack.config.js | 1 - packages/unleash-frontend/lib/index.js | 1 + packages/unleash-frontend/lib/server-dev.js | 1 + packages/unleash-frontend/public/js/UnleashApp.jsx | 1 + .../public/js/__tests__/components/Menu-test.js | 1 - .../components/feature/ArchiveFeatureComponent-test.js | 1 + .../__tests__/components/feature/FeatureForm-test.js | 1 + .../__tests__/components/feature/FeatureList-test.js | 1 + .../js/__tests__/stores/FeatureToggleStore-test.js | 1 + packages/unleash-frontend/public/js/app.jsx | 1 + .../public/js/components/ErrorMessages.jsx | 1 + .../public/js/components/ErrorMessages.ui.jsx | 1 + .../unleash-frontend/public/js/components/Menu.jsx | 1 + .../unleash-frontend/public/js/components/User.jsx | 1 + .../js/components/feature/ArchiveFeatureComponent.jsx | 1 + .../public/js/components/feature/Feature.jsx | 1 + .../public/js/components/feature/FeatureForm.jsx | 1 + .../public/js/components/feature/FeatureList.jsx | 1 + .../js/components/feature/FeatureTogglesComponent.jsx | 1 + .../public/js/components/form/TextInput.jsx | 1 + .../public/js/components/log/LogEntriesComponent.jsx | 1 + .../public/js/components/log/LogEntry.jsx | 1 + .../public/js/components/log/LogEntryList.jsx | 1 + .../js/components/strategy/StrategiesComponent.jsx | 1 + .../public/js/components/strategy/Strategy.jsx | 1 + .../public/js/components/strategy/StrategyForm.jsx | 1 + .../public/js/components/strategy/StrategyList.jsx | 1 + packages/unleash-frontend/public/js/routes.jsx | 1 + .../public/js/stores/ArchivedToggleStore.js | 1 + .../unleash-frontend/public/js/stores/ErrorActions.js | 1 + .../unleash-frontend/public/js/stores/ErrorStore.js | 1 + .../unleash-frontend/public/js/stores/EventStore.js | 1 + .../public/js/stores/FeatureToggleActions.js | 1 + .../public/js/stores/FeatureToggleServerFacade.js | 1 + .../public/js/stores/FeatureToggleStore.js | 1 + .../unleash-frontend/public/js/stores/StrategyAPI.js | 1 + .../public/js/stores/StrategyActions.js | 1 + .../unleash-frontend/public/js/stores/StrategyStore.js | 1 + .../unleash-frontend/public/js/stores/UserStore.js | 1 + .../unleash-frontend/public/js/stores/initalizer.js | 1 + packages/unleash-frontend/public/js/utils/Timer.js | 1 + packages/unleash-frontend/webpack.config.js | 1 - packages/unleash-server/bin/unleash.js | 1 - packages/unleash-server/server.js | 1 + 87 files changed, 91 insertions(+), 13 deletions(-) diff --git a/lerna.json b/lerna.json index efe8073fd0..dfcc2e9f35 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { - "lerna": "2.0.0-beta.29", + "lerna": "2.0.0-beta.30", "version": "independent" } diff --git a/package.json b/package.json index 26b37c390a..9537060fa4 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,11 @@ "dependencies": {}, "devDependencies": { "babel-eslint": "^7.0.0", - "eslint": "^3.4.0", - "eslint-config-finn": "1.0.0-alpha.11", + "eslint": "^3.8.1", + "eslint-config-finn": "1.0.0-beta.1", "eslint-config-finn-react": "^1.0.0-alpha.2", - "eslint-plugin-react": "^6.2.0", - "lerna": "2.0.0-beta.29", - "nsp": "^2.3.2" + "eslint-plugin-react": "^6.4.1", + "lerna": "2.0.0-beta.30", + "nsp": "^2.6.2" } } diff --git a/packages/unleash-api/app.js b/packages/unleash-api/app.js index 9fc92d3efc..6de804cfed 100644 --- a/packages/unleash-api/app.js +++ b/packages/unleash-api/app.js @@ -1,4 +1,5 @@ 'use strict'; + const express = require('express'); const favicon = require('serve-favicon'); const bodyParser = require('body-parser'); diff --git a/packages/unleash-api/lib/db/dbPool.js b/packages/unleash-api/lib/db/dbPool.js index a105b47931..2d09b58ed2 100644 --- a/packages/unleash-api/lib/db/dbPool.js +++ b/packages/unleash-api/lib/db/dbPool.js @@ -1,4 +1,5 @@ 'use strict'; + const knex = require('knex'); module.exports = function (databaseConnection) { diff --git a/packages/unleash-api/lib/db/event.js b/packages/unleash-api/lib/db/event.js index f23afda9cd..a47f061def 100644 --- a/packages/unleash-api/lib/db/event.js +++ b/packages/unleash-api/lib/db/event.js @@ -1,4 +1,5 @@ 'use strict'; + const EVENT_COLUMNS = ['id', 'type', 'created_by', 'created_at', 'data']; module.exports = function (db) { diff --git a/packages/unleash-api/lib/db/feature.js b/packages/unleash-api/lib/db/feature.js index ba4257defa..296e77f391 100644 --- a/packages/unleash-api/lib/db/feature.js +++ b/packages/unleash-api/lib/db/feature.js @@ -1,4 +1,5 @@ 'use strict'; + const eventType = require('../eventType'); const logger = require('../logger'); const NotFoundError = require('../error/NotFoundError'); diff --git a/packages/unleash-api/lib/db/strategy.js b/packages/unleash-api/lib/db/strategy.js index 95106d2d1e..e53abfc4a7 100644 --- a/packages/unleash-api/lib/db/strategy.js +++ b/packages/unleash-api/lib/db/strategy.js @@ -1,4 +1,5 @@ 'use strict'; + const eventType = require('../eventType'); const logger = require('../logger'); const NotFoundError = require('../error/NotFoundError'); diff --git a/packages/unleash-api/lib/error/NameExistsError.js b/packages/unleash-api/lib/error/NameExistsError.js index c821f11ef1..c3ea9c98ce 100644 --- a/packages/unleash-api/lib/error/NameExistsError.js +++ b/packages/unleash-api/lib/error/NameExistsError.js @@ -1,4 +1,5 @@ 'use strict'; + const util = require('util'); function NameExistsError (message) { diff --git a/packages/unleash-api/lib/error/NotFoundError.js b/packages/unleash-api/lib/error/NotFoundError.js index f68bec46fa..ed06f80acb 100644 --- a/packages/unleash-api/lib/error/NotFoundError.js +++ b/packages/unleash-api/lib/error/NotFoundError.js @@ -1,4 +1,5 @@ 'use strict'; + const util = require('util'); function NotFoundError (message) { diff --git a/packages/unleash-api/lib/error/ValidationError.js b/packages/unleash-api/lib/error/ValidationError.js index 67fdd1b829..5f34bbe9d7 100644 --- a/packages/unleash-api/lib/error/ValidationError.js +++ b/packages/unleash-api/lib/error/ValidationError.js @@ -1,4 +1,5 @@ 'use strict'; + const util = require('util'); function ValidationError (message) { diff --git a/packages/unleash-api/lib/error/validateRequest.js b/packages/unleash-api/lib/error/validateRequest.js index 921c5bed29..2430e5cc33 100644 --- a/packages/unleash-api/lib/error/validateRequest.js +++ b/packages/unleash-api/lib/error/validateRequest.js @@ -1,4 +1,5 @@ 'use strict'; + const BPromise = require('bluebird'); const ValidationError = require('./ValidationError'); diff --git a/packages/unleash-api/lib/eventDiffer.js b/packages/unleash-api/lib/eventDiffer.js index 143b554a68..9b12edb5b5 100644 --- a/packages/unleash-api/lib/eventDiffer.js +++ b/packages/unleash-api/lib/eventDiffer.js @@ -1,4 +1,5 @@ 'use strict'; + const eventType = require('./eventType'); const diff = require('deep-diff').diff; diff --git a/packages/unleash-api/lib/eventStore.js b/packages/unleash-api/lib/eventStore.js index ddb8aba231..b97e937fc4 100644 --- a/packages/unleash-api/lib/eventStore.js +++ b/packages/unleash-api/lib/eventStore.js @@ -1,4 +1,5 @@ 'use strict'; + const util = require('util'); const EventEmitter = require('events').EventEmitter; diff --git a/packages/unleash-api/lib/eventType.js b/packages/unleash-api/lib/eventType.js index 267405c64b..c2c1cb14e2 100644 --- a/packages/unleash-api/lib/eventType.js +++ b/packages/unleash-api/lib/eventType.js @@ -1,4 +1,5 @@ 'use strict'; + module.exports = { featureCreated: 'feature-created', featureUpdated: 'feature-updated', diff --git a/packages/unleash-api/lib/extractUser.js b/packages/unleash-api/lib/extractUser.js index 996c5b5689..311548def7 100644 --- a/packages/unleash-api/lib/extractUser.js +++ b/packages/unleash-api/lib/extractUser.js @@ -1,4 +1,5 @@ 'use strict'; + function extractUsername (req) { return req.cookies.username || 'unknown'; } diff --git a/packages/unleash-api/lib/logger.js b/packages/unleash-api/lib/logger.js index 734699fd20..dcf7ddfde9 100644 --- a/packages/unleash-api/lib/logger.js +++ b/packages/unleash-api/lib/logger.js @@ -1,4 +1,5 @@ 'use strict'; + const log4js = require('log4js'); log4js.clearAppenders(); diff --git a/packages/unleash-api/lib/routes/event.js b/packages/unleash-api/lib/routes/event.js index 568ee9e8ff..94cb2974ae 100644 --- a/packages/unleash-api/lib/routes/event.js +++ b/packages/unleash-api/lib/routes/event.js @@ -1,4 +1,5 @@ 'use strict'; + const eventDiffer = require('../eventDiffer'); const version = 1; diff --git a/packages/unleash-api/lib/routes/feature-archive.js b/packages/unleash-api/lib/routes/feature-archive.js index 24a3976ad1..e6fd6a8893 100644 --- a/packages/unleash-api/lib/routes/feature-archive.js +++ b/packages/unleash-api/lib/routes/feature-archive.js @@ -1,4 +1,5 @@ 'use strict'; + const logger = require('../logger'); const eventType = require('../eventType'); const ValidationError = require('../error/ValidationError'); diff --git a/packages/unleash-api/lib/routes/feature.js b/packages/unleash-api/lib/routes/feature.js index 9ac253928c..0bf8582c02 100644 --- a/packages/unleash-api/lib/routes/feature.js +++ b/packages/unleash-api/lib/routes/feature.js @@ -1,4 +1,5 @@ 'use strict'; + const BPromise = require('bluebird'); const logger = require('../logger'); const eventType = require('../eventType'); diff --git a/packages/unleash-api/lib/routes/health-check.js b/packages/unleash-api/lib/routes/health-check.js index 7cb2ab6fb8..fbf984efe8 100644 --- a/packages/unleash-api/lib/routes/health-check.js +++ b/packages/unleash-api/lib/routes/health-check.js @@ -1,4 +1,5 @@ 'use strict'; + const logger = require('../logger'); module.exports = function (app, config) { diff --git a/packages/unleash-api/lib/routes/strategy.js b/packages/unleash-api/lib/routes/strategy.js index 00356aad5b..61ed76257f 100644 --- a/packages/unleash-api/lib/routes/strategy.js +++ b/packages/unleash-api/lib/routes/strategy.js @@ -1,4 +1,5 @@ 'use strict'; + const BPromise = require('bluebird'); const eventType = require('../eventType'); const logger = require('../logger'); diff --git a/packages/unleash-api/migrations/20141020151056-initial-schema.js b/packages/unleash-api/migrations/20141020151056-initial-schema.js index 60b580a909..1b332b4629 100644 --- a/packages/unleash-api/migrations/20141020151056-initial-schema.js +++ b/packages/unleash-api/migrations/20141020151056-initial-schema.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('001-initial-schema'); diff --git a/packages/unleash-api/migrations/20141110144153-add-description-to-features.js b/packages/unleash-api/migrations/20141110144153-add-description-to-features.js index 7a303a4497..88078c57f6 100644 --- a/packages/unleash-api/migrations/20141110144153-add-description-to-features.js +++ b/packages/unleash-api/migrations/20141110144153-add-description-to-features.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('002-add-description-to-features'); diff --git a/packages/unleash-api/migrations/20141117200435-add-parameters-template-to-strategies.js b/packages/unleash-api/migrations/20141117200435-add-parameters-template-to-strategies.js index 9bfb2e7d04..f1ca91168e 100644 --- a/packages/unleash-api/migrations/20141117200435-add-parameters-template-to-strategies.js +++ b/packages/unleash-api/migrations/20141117200435-add-parameters-template-to-strategies.js @@ -1,3 +1,4 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('003-add-parameters-template-to-strategies'); diff --git a/packages/unleash-api/migrations/20141117202209-insert-default-strategy.js b/packages/unleash-api/migrations/20141117202209-insert-default-strategy.js index 2e3f045dd2..4c40ad9d43 100644 --- a/packages/unleash-api/migrations/20141117202209-insert-default-strategy.js +++ b/packages/unleash-api/migrations/20141117202209-insert-default-strategy.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy'); diff --git a/packages/unleash-api/migrations/20141118071458-default-strategy-event.js b/packages/unleash-api/migrations/20141118071458-default-strategy-event.js index 4bf9714f96..560b293fe0 100644 --- a/packages/unleash-api/migrations/20141118071458-default-strategy-event.js +++ b/packages/unleash-api/migrations/20141118071458-default-strategy-event.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy-event'); diff --git a/packages/unleash-api/migrations/20141215210141-005-archived-flag-to-features.js b/packages/unleash-api/migrations/20141215210141-005-archived-flag-to-features.js index ec07154c5d..5f11f0df55 100644 --- a/packages/unleash-api/migrations/20141215210141-005-archived-flag-to-features.js +++ b/packages/unleash-api/migrations/20141215210141-005-archived-flag-to-features.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('005-archived-flag-to-features'); diff --git a/packages/unleash-api/migrations/20150210152531-006-rename-eventtype.js b/packages/unleash-api/migrations/20150210152531-006-rename-eventtype.js index 08e537c529..d03c832d3a 100644 --- a/packages/unleash-api/migrations/20150210152531-006-rename-eventtype.js +++ b/packages/unleash-api/migrations/20150210152531-006-rename-eventtype.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('006-rename-eventtype'); diff --git a/packages/unleash-api/migrations/20160618193924-add-strategies-to-features.js b/packages/unleash-api/migrations/20160618193924-add-strategies-to-features.js index 82e87ab8aa..9f970332b2 100644 --- a/packages/unleash-api/migrations/20160618193924-add-strategies-to-features.js +++ b/packages/unleash-api/migrations/20160618193924-add-strategies-to-features.js @@ -1,2 +1,3 @@ 'use strict'; + module.exports = require('../scripts/migration-runner').create('007-add-strategies-to-features'); diff --git a/packages/unleash-api/scripts/migration-runner.js b/packages/unleash-api/scripts/migration-runner.js index 1535a852d6..8624c5dcf3 100644 --- a/packages/unleash-api/scripts/migration-runner.js +++ b/packages/unleash-api/scripts/migration-runner.js @@ -1,4 +1,5 @@ 'use strict'; + const fs = require('fs'); const util = require('util'); const path = require('path'); diff --git a/packages/unleash-api/server-impl.js b/packages/unleash-api/server-impl.js index abd0ba922e..0cb19b964c 100644 --- a/packages/unleash-api/server-impl.js +++ b/packages/unleash-api/server-impl.js @@ -1,4 +1,5 @@ 'use strict'; + const logger = require('./lib/logger'); const migrator = require('./migrator'); diff --git a/packages/unleash-api/test/e2e/databaseConfig.js b/packages/unleash-api/test/e2e/databaseConfig.js index ba39dbb6d3..6aaf81cee5 100644 --- a/packages/unleash-api/test/e2e/databaseConfig.js +++ b/packages/unleash-api/test/e2e/databaseConfig.js @@ -1,4 +1,5 @@ 'use strict'; + function getDatabaseUri () { if (!process.env.TEST_DATABASE_URL) { throw new Error('please set TEST_DATABASE_URL'); diff --git a/packages/unleash-api/test/e2e/eventApiSpec.js b/packages/unleash-api/test/e2e/eventApiSpec.js index b3ef2f1db3..9a1986b4e2 100644 --- a/packages/unleash-api/test/e2e/eventApiSpec.js +++ b/packages/unleash-api/test/e2e/eventApiSpec.js @@ -1,4 +1,5 @@ 'use strict'; + const request = require('./specHelper').request; describe('The event api', () => { diff --git a/packages/unleash-api/test/e2e/featureApiSpec.js b/packages/unleash-api/test/e2e/featureApiSpec.js index 5c383125d3..1226ec308c 100644 --- a/packages/unleash-api/test/e2e/featureApiSpec.js +++ b/packages/unleash-api/test/e2e/featureApiSpec.js @@ -1,4 +1,5 @@ 'use strict'; + const logger = require('../../lib/logger'); const assert = require('assert'); const specHelper = require('./specHelper'); diff --git a/packages/unleash-api/test/e2e/featureArchiveApiSpec.js b/packages/unleash-api/test/e2e/featureArchiveApiSpec.js index 1a350c949a..20957599ea 100644 --- a/packages/unleash-api/test/e2e/featureArchiveApiSpec.js +++ b/packages/unleash-api/test/e2e/featureArchiveApiSpec.js @@ -1,4 +1,5 @@ 'use strict'; + const assert = require('assert'); const specHelper = require('./specHelper'); const request = specHelper.request; diff --git a/packages/unleash-api/test/e2e/routerSpec.js b/packages/unleash-api/test/e2e/routerSpec.js index 1c485bfb42..48b2e3971f 100644 --- a/packages/unleash-api/test/e2e/routerSpec.js +++ b/packages/unleash-api/test/e2e/routerSpec.js @@ -1,4 +1,5 @@ 'use strict'; + const specHelper = require('./specHelper'); const request = specHelper.request; diff --git a/packages/unleash-api/test/e2e/specHelper.js b/packages/unleash-api/test/e2e/specHelper.js index 1033b4591b..e6bc71fe77 100644 --- a/packages/unleash-api/test/e2e/specHelper.js +++ b/packages/unleash-api/test/e2e/specHelper.js @@ -1,4 +1,5 @@ 'use strict'; + process.env.NODE_ENV = 'test'; const BPromise = require('bluebird'); diff --git a/packages/unleash-api/test/e2e/strategyApiSpec.js b/packages/unleash-api/test/e2e/strategyApiSpec.js index 681dcd2faf..82b80a7f31 100644 --- a/packages/unleash-api/test/e2e/strategyApiSpec.js +++ b/packages/unleash-api/test/e2e/strategyApiSpec.js @@ -1,4 +1,5 @@ 'use strict'; + const specHelper = require('./specHelper'); const request = specHelper.request; diff --git a/packages/unleash-api/test/unit/eventDiffer.test.js b/packages/unleash-api/test/unit/eventDiffer.test.js index a40e3b3b21..38b6597900 100644 --- a/packages/unleash-api/test/unit/eventDiffer.test.js +++ b/packages/unleash-api/test/unit/eventDiffer.test.js @@ -1,4 +1,5 @@ 'use strict'; + const eventDiffer = require('../../lib/eventDiffer'); const eventType = require('../../lib/eventType'); const assert = require('assert'); diff --git a/packages/unleash-api/test/unit/helper/legacy-feature-mapper.test.js b/packages/unleash-api/test/unit/helper/legacy-feature-mapper.test.js index 1b288da2af..68167fca58 100644 --- a/packages/unleash-api/test/unit/helper/legacy-feature-mapper.test.js +++ b/packages/unleash-api/test/unit/helper/legacy-feature-mapper.test.js @@ -1,4 +1,5 @@ 'use strict'; + const assert = require('assert'); const mapper = require('../../../lib/helper/legacy-feature-mapper'); diff --git a/packages/unleash-docker/index.js b/packages/unleash-docker/index.js index 58f49486b0..40dd3dfbed 100644 --- a/packages/unleash-docker/index.js +++ b/packages/unleash-docker/index.js @@ -1,3 +1,4 @@ 'use strict'; + const unleash = require('unleash-server'); unleash.start({}); diff --git a/packages/unleash-frontend-next/index.js b/packages/unleash-frontend-next/index.js index a801f347b6..621880f22a 100644 --- a/packages/unleash-frontend-next/index.js +++ b/packages/unleash-frontend-next/index.js @@ -1,4 +1,5 @@ 'use strict'; + const path = require('path'); module.exports = { diff --git a/packages/unleash-frontend-next/src/component/feature/configure-strategy.jsx b/packages/unleash-frontend-next/src/component/feature/configure-strategy.jsx index 5defe79f14..8d588c1c01 100644 --- a/packages/unleash-frontend-next/src/component/feature/configure-strategy.jsx +++ b/packages/unleash-frontend-next/src/component/feature/configure-strategy.jsx @@ -1,7 +1,7 @@ import React, { PropTypes } from 'react'; import Input from 'react-toolbox/lib/input'; import Button from 'react-toolbox/lib/button'; -import { List, ListItem, ListSubHeader, ListDivider } from 'react-toolbox/lib/list'; +import { ListItem } from 'react-toolbox/lib/list'; class ConfigureStrategies extends React.Component { @@ -37,7 +37,6 @@ class ConfigureStrategies extends React.Component { } renderInputFields (strategyDefinition) { - if (strategyDefinition.parametersTemplate) { return Object.keys(strategyDefinition.parametersTemplate).map(field => ( Strategy "{this.props.strategy.name}" deleted}/> + Strategy "{this.props.strategy.name}" deleted} + /> ); } diff --git a/packages/unleash-frontend-next/webpack.config.js b/packages/unleash-frontend-next/webpack.config.js index 5722870e7d..208b4a1e3d 100644 --- a/packages/unleash-frontend-next/webpack.config.js +++ b/packages/unleash-frontend-next/webpack.config.js @@ -1,5 +1,4 @@ // docs: http://webpack.github.io/docs/configuration.html - 'use strict'; const path = require('path'); diff --git a/packages/unleash-frontend/lib/index.js b/packages/unleash-frontend/lib/index.js index 1a26e24151..f4e28aabcd 100644 --- a/packages/unleash-frontend/lib/index.js +++ b/packages/unleash-frontend/lib/index.js @@ -1,4 +1,5 @@ 'use strict'; + const path = require('path'); module.exports = { diff --git a/packages/unleash-frontend/lib/server-dev.js b/packages/unleash-frontend/lib/server-dev.js index 4d48b046bb..fb6b6a5a0d 100644 --- a/packages/unleash-frontend/lib/server-dev.js +++ b/packages/unleash-frontend/lib/server-dev.js @@ -1,4 +1,5 @@ 'use strict'; + const server = require('unleash-api'); const unleash = server.start({}); diff --git a/packages/unleash-frontend/public/js/UnleashApp.jsx b/packages/unleash-frontend/public/js/UnleashApp.jsx index 8d8733666c..4532c563d0 100644 --- a/packages/unleash-frontend/public/js/UnleashApp.jsx +++ b/packages/unleash-frontend/public/js/UnleashApp.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Router = require('react-router'); const Menu = require('./components/Menu'); diff --git a/packages/unleash-frontend/public/js/__tests__/components/Menu-test.js b/packages/unleash-frontend/public/js/__tests__/components/Menu-test.js index 60858d213e..fa525c5ad8 100644 --- a/packages/unleash-frontend/public/js/__tests__/components/Menu-test.js +++ b/packages/unleash-frontend/public/js/__tests__/components/Menu-test.js @@ -1,5 +1,4 @@ /** @jsx React.DOM */ - 'use strict'; jest.dontMock('../../components/Menu'); diff --git a/packages/unleash-frontend/public/js/__tests__/components/feature/ArchiveFeatureComponent-test.js b/packages/unleash-frontend/public/js/__tests__/components/feature/ArchiveFeatureComponent-test.js index b1a70fc851..2052b866c5 100644 --- a/packages/unleash-frontend/public/js/__tests__/components/feature/ArchiveFeatureComponent-test.js +++ b/packages/unleash-frontend/public/js/__tests__/components/feature/ArchiveFeatureComponent-test.js @@ -1,4 +1,5 @@ 'use strict'; + jest.dontMock('../../../components/feature/ArchiveFeatureComponent'); jest.mock('../../../stores/FeatureToggleActions'); jest.autoMockOff(); diff --git a/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureForm-test.js b/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureForm-test.js index 9b88d6a8aa..adc310e2be 100644 --- a/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureForm-test.js +++ b/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureForm-test.js @@ -1,4 +1,5 @@ 'use strict'; + jest.dontMock('../../../components/feature/FeatureForm'); const React = require('react/addons'); diff --git a/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureList-test.js b/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureList-test.js index f5022e26b9..9e08e517c7 100644 --- a/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureList-test.js +++ b/packages/unleash-frontend/public/js/__tests__/components/feature/FeatureList-test.js @@ -1,4 +1,5 @@ 'use strict'; + jest.dontMock('../../../components/feature/FeatureList'); jest.dontMock('../../../components/feature/Feature'); diff --git a/packages/unleash-frontend/public/js/__tests__/stores/FeatureToggleStore-test.js b/packages/unleash-frontend/public/js/__tests__/stores/FeatureToggleStore-test.js index d7dd124e46..7a06d38a4c 100644 --- a/packages/unleash-frontend/public/js/__tests__/stores/FeatureToggleStore-test.js +++ b/packages/unleash-frontend/public/js/__tests__/stores/FeatureToggleStore-test.js @@ -1,4 +1,5 @@ 'use strict'; + jest.autoMockOff(); jest.dontMock('../../stores/FeatureToggleActions'); jest.dontMock('../../stores/FeatureToggleStore'); diff --git a/packages/unleash-frontend/public/js/app.jsx b/packages/unleash-frontend/public/js/app.jsx index d5c6abd6f3..c79926c75b 100644 --- a/packages/unleash-frontend/public/js/app.jsx +++ b/packages/unleash-frontend/public/js/app.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Router = require('react-router'); const UserStore = require('./stores/UserStore'); diff --git a/packages/unleash-frontend/public/js/components/ErrorMessages.jsx b/packages/unleash-frontend/public/js/components/ErrorMessages.jsx index a45cefc68f..1468019f7d 100644 --- a/packages/unleash-frontend/public/js/components/ErrorMessages.jsx +++ b/packages/unleash-frontend/public/js/components/ErrorMessages.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Ui = require('./ErrorMessages.ui'); const ErrorStore = require('../stores/ErrorStore'); diff --git a/packages/unleash-frontend/public/js/components/ErrorMessages.ui.jsx b/packages/unleash-frontend/public/js/components/ErrorMessages.ui.jsx index 005068ab4b..09770ad38a 100644 --- a/packages/unleash-frontend/public/js/components/ErrorMessages.ui.jsx +++ b/packages/unleash-frontend/public/js/components/ErrorMessages.ui.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const ErrorMessages = React.createClass({ diff --git a/packages/unleash-frontend/public/js/components/Menu.jsx b/packages/unleash-frontend/public/js/components/Menu.jsx index db189ed744..a9171d3231 100644 --- a/packages/unleash-frontend/public/js/components/Menu.jsx +++ b/packages/unleash-frontend/public/js/components/Menu.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const User = require('./User'); diff --git a/packages/unleash-frontend/public/js/components/User.jsx b/packages/unleash-frontend/public/js/components/User.jsx index dbc498b7a2..09bddedfa8 100644 --- a/packages/unleash-frontend/public/js/components/User.jsx +++ b/packages/unleash-frontend/public/js/components/User.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const UserStore = require('../stores/UserStore'); diff --git a/packages/unleash-frontend/public/js/components/feature/ArchiveFeatureComponent.jsx b/packages/unleash-frontend/public/js/components/feature/ArchiveFeatureComponent.jsx index 88ed129ac2..53ba94dc9a 100644 --- a/packages/unleash-frontend/public/js/components/feature/ArchiveFeatureComponent.jsx +++ b/packages/unleash-frontend/public/js/components/feature/ArchiveFeatureComponent.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const FeatureActions = require('../../stores/FeatureToggleActions'); diff --git a/packages/unleash-frontend/public/js/components/feature/Feature.jsx b/packages/unleash-frontend/public/js/components/feature/Feature.jsx index 224f17fd7d..31a8096ae5 100644 --- a/packages/unleash-frontend/public/js/components/feature/Feature.jsx +++ b/packages/unleash-frontend/public/js/components/feature/Feature.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const FeatureForm = require('./FeatureForm'); const LogEntryList = require('../log/LogEntryList'); diff --git a/packages/unleash-frontend/public/js/components/feature/FeatureForm.jsx b/packages/unleash-frontend/public/js/components/feature/FeatureForm.jsx index 84a00e4582..0b46c1fab5 100644 --- a/packages/unleash-frontend/public/js/components/feature/FeatureForm.jsx +++ b/packages/unleash-frontend/public/js/components/feature/FeatureForm.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const TextInput = require('../form/TextInput'); diff --git a/packages/unleash-frontend/public/js/components/feature/FeatureList.jsx b/packages/unleash-frontend/public/js/components/feature/FeatureList.jsx index d111e57df4..cb626c9048 100644 --- a/packages/unleash-frontend/public/js/components/feature/FeatureList.jsx +++ b/packages/unleash-frontend/public/js/components/feature/FeatureList.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Feature = require('./Feature'); diff --git a/packages/unleash-frontend/public/js/components/feature/FeatureTogglesComponent.jsx b/packages/unleash-frontend/public/js/components/feature/FeatureTogglesComponent.jsx index 2cc7df2be7..1aab7a4a96 100644 --- a/packages/unleash-frontend/public/js/components/feature/FeatureTogglesComponent.jsx +++ b/packages/unleash-frontend/public/js/components/feature/FeatureTogglesComponent.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const FeatureList = require('./FeatureList'); const FeatureForm = require('./FeatureForm'); diff --git a/packages/unleash-frontend/public/js/components/form/TextInput.jsx b/packages/unleash-frontend/public/js/components/form/TextInput.jsx index 31b91a2d1f..056cb15563 100644 --- a/packages/unleash-frontend/public/js/components/form/TextInput.jsx +++ b/packages/unleash-frontend/public/js/components/form/TextInput.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const TextInput = React.createClass({ diff --git a/packages/unleash-frontend/public/js/components/log/LogEntriesComponent.jsx b/packages/unleash-frontend/public/js/components/log/LogEntriesComponent.jsx index 54b4f4702f..248de77f7a 100644 --- a/packages/unleash-frontend/public/js/components/log/LogEntriesComponent.jsx +++ b/packages/unleash-frontend/public/js/components/log/LogEntriesComponent.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const LogEntryList = require('./LogEntryList'); const eventStore = require('../../stores/EventStore'); diff --git a/packages/unleash-frontend/public/js/components/log/LogEntry.jsx b/packages/unleash-frontend/public/js/components/log/LogEntry.jsx index f852c79159..39cdc91340 100644 --- a/packages/unleash-frontend/public/js/components/log/LogEntry.jsx +++ b/packages/unleash-frontend/public/js/components/log/LogEntry.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const moment = require('moment'); diff --git a/packages/unleash-frontend/public/js/components/log/LogEntryList.jsx b/packages/unleash-frontend/public/js/components/log/LogEntryList.jsx index e6f621872c..0c3d5cc0c5 100644 --- a/packages/unleash-frontend/public/js/components/log/LogEntryList.jsx +++ b/packages/unleash-frontend/public/js/components/log/LogEntryList.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const LogEntry = require('./LogEntry'); diff --git a/packages/unleash-frontend/public/js/components/strategy/StrategiesComponent.jsx b/packages/unleash-frontend/public/js/components/strategy/StrategiesComponent.jsx index 4785b0f5f1..8ee74a5906 100644 --- a/packages/unleash-frontend/public/js/components/strategy/StrategiesComponent.jsx +++ b/packages/unleash-frontend/public/js/components/strategy/StrategiesComponent.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const StrategyList = require('./StrategyList'); const StrategyForm = require('./StrategyForm'); diff --git a/packages/unleash-frontend/public/js/components/strategy/Strategy.jsx b/packages/unleash-frontend/public/js/components/strategy/Strategy.jsx index a7d8a56ce2..a7c13d73e9 100644 --- a/packages/unleash-frontend/public/js/components/strategy/Strategy.jsx +++ b/packages/unleash-frontend/public/js/components/strategy/Strategy.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Strategy = React.createClass({ diff --git a/packages/unleash-frontend/public/js/components/strategy/StrategyForm.jsx b/packages/unleash-frontend/public/js/components/strategy/StrategyForm.jsx index 81f3d8ddfa..1dcd3f8bb1 100644 --- a/packages/unleash-frontend/public/js/components/strategy/StrategyForm.jsx +++ b/packages/unleash-frontend/public/js/components/strategy/StrategyForm.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const TextInput = require('../form/TextInput'); diff --git a/packages/unleash-frontend/public/js/components/strategy/StrategyList.jsx b/packages/unleash-frontend/public/js/components/strategy/StrategyList.jsx index dd11ab3686..846c54a6fc 100644 --- a/packages/unleash-frontend/public/js/components/strategy/StrategyList.jsx +++ b/packages/unleash-frontend/public/js/components/strategy/StrategyList.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Strategy = require('./Strategy'); diff --git a/packages/unleash-frontend/public/js/routes.jsx b/packages/unleash-frontend/public/js/routes.jsx index 8194cd4e63..7ec83a4e06 100644 --- a/packages/unleash-frontend/public/js/routes.jsx +++ b/packages/unleash-frontend/public/js/routes.jsx @@ -1,4 +1,5 @@ 'use strict'; + const React = require('react'); const Router = require('react-router'); const UnleashApp = require('./UnleashApp'); diff --git a/packages/unleash-frontend/public/js/stores/ArchivedToggleStore.js b/packages/unleash-frontend/public/js/stores/ArchivedToggleStore.js index c9a165aa9c..17fd6e255b 100644 --- a/packages/unleash-frontend/public/js/stores/ArchivedToggleStore.js +++ b/packages/unleash-frontend/public/js/stores/ArchivedToggleStore.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const FeatureActions = require('./FeatureToggleActions'); const filter = require('lodash/collection/filter'); diff --git a/packages/unleash-frontend/public/js/stores/ErrorActions.js b/packages/unleash-frontend/public/js/stores/ErrorActions.js index ef03a146a6..a8403d96a8 100644 --- a/packages/unleash-frontend/public/js/stores/ErrorActions.js +++ b/packages/unleash-frontend/public/js/stores/ErrorActions.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const ErrorActions = Reflux.createActions([ diff --git a/packages/unleash-frontend/public/js/stores/ErrorStore.js b/packages/unleash-frontend/public/js/stores/ErrorStore.js index 38e3beb916..d785006ab3 100644 --- a/packages/unleash-frontend/public/js/stores/ErrorStore.js +++ b/packages/unleash-frontend/public/js/stores/ErrorStore.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const FeatureActions = require('./FeatureToggleActions'); const ErrorActions = require('./ErrorActions'); diff --git a/packages/unleash-frontend/public/js/stores/EventStore.js b/packages/unleash-frontend/public/js/stores/EventStore.js index 685726e113..7b4c390d36 100644 --- a/packages/unleash-frontend/public/js/stores/EventStore.js +++ b/packages/unleash-frontend/public/js/stores/EventStore.js @@ -1,4 +1,5 @@ 'use strict'; + const reqwest = require('reqwest'); const TYPE = 'json'; diff --git a/packages/unleash-frontend/public/js/stores/FeatureToggleActions.js b/packages/unleash-frontend/public/js/stores/FeatureToggleActions.js index 6092daa0fd..c6c58bfb9f 100644 --- a/packages/unleash-frontend/public/js/stores/FeatureToggleActions.js +++ b/packages/unleash-frontend/public/js/stores/FeatureToggleActions.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const Server = require('./FeatureToggleServerFacade'); diff --git a/packages/unleash-frontend/public/js/stores/FeatureToggleServerFacade.js b/packages/unleash-frontend/public/js/stores/FeatureToggleServerFacade.js index d17fa0e375..4f0f250b3b 100644 --- a/packages/unleash-frontend/public/js/stores/FeatureToggleServerFacade.js +++ b/packages/unleash-frontend/public/js/stores/FeatureToggleServerFacade.js @@ -1,4 +1,5 @@ 'use strict'; + const reqwest = require('reqwest'); const TYPE = 'json'; diff --git a/packages/unleash-frontend/public/js/stores/FeatureToggleStore.js b/packages/unleash-frontend/public/js/stores/FeatureToggleStore.js index d552247946..3c0eb5a0ca 100644 --- a/packages/unleash-frontend/public/js/stores/FeatureToggleStore.js +++ b/packages/unleash-frontend/public/js/stores/FeatureToggleStore.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const FeatureActions = require('./FeatureToggleActions'); const filter = require('lodash/collection/filter'); diff --git a/packages/unleash-frontend/public/js/stores/StrategyAPI.js b/packages/unleash-frontend/public/js/stores/StrategyAPI.js index 772b279234..5e1e8f3a22 100644 --- a/packages/unleash-frontend/public/js/stores/StrategyAPI.js +++ b/packages/unleash-frontend/public/js/stores/StrategyAPI.js @@ -1,4 +1,5 @@ 'use strict'; + const reqwest = require('reqwest'); const TYPE = 'json'; diff --git a/packages/unleash-frontend/public/js/stores/StrategyActions.js b/packages/unleash-frontend/public/js/stores/StrategyActions.js index 00729f2da2..50c4befaf7 100644 --- a/packages/unleash-frontend/public/js/stores/StrategyActions.js +++ b/packages/unleash-frontend/public/js/stores/StrategyActions.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const StrategyAPI = require('./StrategyAPI'); diff --git a/packages/unleash-frontend/public/js/stores/StrategyStore.js b/packages/unleash-frontend/public/js/stores/StrategyStore.js index 265d74e55a..02546becc2 100644 --- a/packages/unleash-frontend/public/js/stores/StrategyStore.js +++ b/packages/unleash-frontend/public/js/stores/StrategyStore.js @@ -1,4 +1,5 @@ 'use strict'; + const Reflux = require('reflux'); const StrategyActions = require('./StrategyActions'); const filter = require('lodash/collection/filter'); diff --git a/packages/unleash-frontend/public/js/stores/UserStore.js b/packages/unleash-frontend/public/js/stores/UserStore.js index e62856dfd2..43fc016507 100644 --- a/packages/unleash-frontend/public/js/stores/UserStore.js +++ b/packages/unleash-frontend/public/js/stores/UserStore.js @@ -1,4 +1,5 @@ 'use strict'; + let _username; // Ref: http://stackoverflow.com/questions/10730362/get-cookie-by-name diff --git a/packages/unleash-frontend/public/js/stores/initalizer.js b/packages/unleash-frontend/public/js/stores/initalizer.js index ee14c35246..e1fdaaaca1 100644 --- a/packages/unleash-frontend/public/js/stores/initalizer.js +++ b/packages/unleash-frontend/public/js/stores/initalizer.js @@ -1,4 +1,5 @@ 'use strict'; + const FeatureToggleActions = require('./FeatureToggleActions'); const StrategyActions = require('./StrategyActions'); const Timer = require('../utils/Timer'); diff --git a/packages/unleash-frontend/public/js/utils/Timer.js b/packages/unleash-frontend/public/js/utils/Timer.js index 497ed45934..fb97baa085 100644 --- a/packages/unleash-frontend/public/js/utils/Timer.js +++ b/packages/unleash-frontend/public/js/utils/Timer.js @@ -1,4 +1,5 @@ 'use strict'; + const Timer = function (cb, interval) { this.cb = cb; this.interval = interval; diff --git a/packages/unleash-frontend/webpack.config.js b/packages/unleash-frontend/webpack.config.js index 27feb4132b..be0254ede8 100644 --- a/packages/unleash-frontend/webpack.config.js +++ b/packages/unleash-frontend/webpack.config.js @@ -1,5 +1,4 @@ // docs: http://webpack.github.io/docs/configuration.html - 'use strict'; const path = require('path'); diff --git a/packages/unleash-server/bin/unleash.js b/packages/unleash-server/bin/unleash.js index 2a8305259c..150365d27f 100755 --- a/packages/unleash-server/bin/unleash.js +++ b/packages/unleash-server/bin/unleash.js @@ -1,5 +1,4 @@ #!/usr/bin/env node - 'use strict'; process.env.NODE_ENV = 'production'; diff --git a/packages/unleash-server/server.js b/packages/unleash-server/server.js index d01961a448..2b43e6be0a 100644 --- a/packages/unleash-server/server.js +++ b/packages/unleash-server/server.js @@ -1,4 +1,5 @@ 'use strict'; + const unleash = require('unleash-api'); const { publicFolder } = require('unleash-frontend');