diff --git a/README.md b/README.md
index fd0aa2d8bb..485ee8b4c9 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,11 @@
__Warning: We are in the process of splitting up unleash into multiple packages in this repository, if you want to test the previous package see [previous tag](https://github.com/finn-no/unleash/tree/v1.0.0-alpha.2) __
-[![Build Status](https://travis-ci.org/finn-no/unleash.svg?branch=master)](https://travis-ci.org/finn-no/unleash) [![Code Climate](https://codeclimate.com/github/finn-no/unleash/badges/gpa.svg)](https://codeclimate.com/github/finn-no/unleash) [![Coverage Status](https://coveralls.io/repos/finn-no/unleash/badge.png?branch=master)](https://coveralls.io/r/finn-no/unleash?branch=master) [![Dependency Status](https://david-dm.org/finn-no/unleash.png)](https://david-dm.org/finn-no/unleash) [![devDependency Status](https://david-dm.org/finn-no/unleash/dev-status.png)](https://david-dm.org/finn-no/unleash#info=devD)
+[![Build Status](https://travis-ci.org/finn-no/unleash.svg?branch=master)](https://travis-ci.org/finn-no/unleash)
+[![Code Climate](https://codeclimate.com/github/finn-no/unleash/badges/gpa.svg)](https://codeclimate.com/github/finn-no/unleash)
+[![Coverage Status](https://coveralls.io/repos/finn-no/unleash/badge.svg?branch=master)](https://coveralls.io/r/finn-no/unleash?branch=master)
+[![Dependency Status](https://david-dm.org/finn-no/unleash.svg)](https://david-dm.org/finn-no/unleash)
+[![devDependency Status](https://david-dm.org/finn-no/unleash/dev-status.svg)](https://david-dm.org/finn-no/unleash#info=devD)
![Admin UI](https://cloud.githubusercontent.com/assets/572/5873775/3ddc1a66-a2fa-11e4-923c-0a9569605dad.png)
diff --git a/package.json b/package.json
index 77e09f0d0c..61dea0b26f 100644
--- a/package.json
+++ b/package.json
@@ -18,10 +18,11 @@
"engines": {
"node": "6"
},
+ "license": "Apache-2.0",
"scripts": {
"bootstrap": "lerna bootstrap",
"prepublish": "npm run bootstrap",
- "lint": "node node_modules/eslint/bin/eslint.js packages --fix --ignore-pattern=node_modules --ext=js,jsx",
+ "lint": "eslint . --ext=js,jsx",
"test": "npm run lint && lerna --concurrency=1 exec npm run test",
"test:ci": "npm run lint && lerna --concurrency=1 exec npm run test:ci",
"nsp": "lerna exec nsp check",
@@ -33,8 +34,8 @@
},
"dependencies": {},
"devDependencies": {
- "eslint": "^2.12.0",
- "eslint-config-finn": "^1.0.0-alpha.4",
+ "eslint": "^2.13.1",
+ "eslint-config-finn": "1.0.0-alpha.8",
"eslint-plugin-react": "^4.3.0",
"lerna": "2.0.0-beta.20",
"nsp": "^2.3.2"
diff --git a/packages/unleash-api/lib/error/validateRequest.js b/packages/unleash-api/lib/error/validateRequest.js
index ad2a21e528..921c5bed29 100644
--- a/packages/unleash-api/lib/error/validateRequest.js
+++ b/packages/unleash-api/lib/error/validateRequest.js
@@ -1,9 +1,9 @@
'use strict';
-const Promise = require('bluebird');
+const BPromise = require('bluebird');
const ValidationError = require('./ValidationError');
function validateRequest (req) {
- return new Promise((resolve, reject) => {
+ return new BPromise((resolve, reject) => {
if (req.validationErrors()) {
reject(new ValidationError('Invalid syntax'));
} else {
diff --git a/packages/unleash-api/lib/routes/feature.js b/packages/unleash-api/lib/routes/feature.js
index 634aae34dc..59252b8f4e 100644
--- a/packages/unleash-api/lib/routes/feature.js
+++ b/packages/unleash-api/lib/routes/feature.js
@@ -1,5 +1,5 @@
'use strict';
-const Promise = require('bluebird');
+const BPromise = require('bluebird');
const logger = require('../logger');
const eventType = require('../eventType');
const NameExistsError = require('../error/NameExistsError');
@@ -107,7 +107,7 @@ module.exports = function (app, config) {
});
function validateUniqueName (req) {
- return new Promise((resolve, reject) => {
+ return new BPromise((resolve, reject) => {
featureDb.getFeature(req.body.name)
.then(() => {
reject(new NameExistsError('Feature name already exist'));
diff --git a/packages/unleash-api/lib/routes/strategy.js b/packages/unleash-api/lib/routes/strategy.js
index b47636fc59..2ee50387b4 100644
--- a/packages/unleash-api/lib/routes/strategy.js
+++ b/packages/unleash-api/lib/routes/strategy.js
@@ -1,5 +1,5 @@
'use strict';
-const Promise = require('bluebird');
+const BPromise = require('bluebird');
const eventType = require('../eventType');
const logger = require('../logger');
const NameExistsError = require('../error/NameExistsError');
@@ -78,7 +78,7 @@ module.exports = function (app, config) {
});
function validateStrategyName (req) {
- return new Promise((resolve, reject) => {
+ return new BPromise((resolve, reject) => {
strategyDb.getStrategy(req.body.name)
.then(() => {
reject(new NameExistsError('Feature name already exist'));
diff --git a/packages/unleash-api/test/eventDifferTest.js b/packages/unleash-api/test/eventDifferTest.js
index 9d13c954b2..be3c66436f 100644
--- a/packages/unleash-api/test/eventDifferTest.js
+++ b/packages/unleash-api/test/eventDifferTest.js
@@ -16,17 +16,17 @@ describe('eventDiffer', () => {
});
it('diffs a feature-update event', () => {
- const name = 'foo';
+ const feature = 'foo';
const desc = 'bar';
const events = [
{
type: eventType.featureUpdated,
- data: { name, description: desc, strategy: 'default', enabled: true, parameters: { value: 2 } },
+ data: { name: feature, description: desc, strategy: 'default', enabled: true, parameters: { value: 2 } },
},
{
type: eventType.featureCreated,
- data: { name, description: desc, strategy: 'default', enabled: false, parameters: { value: 1 } },
+ data: { name: feature, description: desc, strategy: 'default', enabled: false, parameters: { value: 1 } },
},
];
diff --git a/packages/unleash-api/test/specHelper.js b/packages/unleash-api/test/specHelper.js
index a9118b7fb8..ebbd17abba 100644
--- a/packages/unleash-api/test/specHelper.js
+++ b/packages/unleash-api/test/specHelper.js
@@ -1,7 +1,7 @@
'use strict';
process.env.NODE_ENV = 'test';
-const Promise = require('bluebird');
+const BPromise = require('bluebird');
let request = require('supertest');
const databaseUri = require('./databaseConfig').getDatabaseUri();
const knex = require('../lib/db/dbPool')(databaseUri);
@@ -20,11 +20,11 @@ const app = require('../app')({
strategyDb,
});
-Promise.promisifyAll(request);
+BPromise.promisifyAll(request);
request = request(app);
function createStrategies () {
- return Promise.map([
+ return BPromise.map([
{
name: 'default',
description: 'Default on or off Strategy.',
@@ -41,7 +41,7 @@ function createStrategies () {
}
function createFeatures () {
- return Promise.map([
+ return BPromise.map([
{
name: 'featureX',
description: 'the #1 feature',
@@ -105,11 +105,11 @@ function destroyFeatures () {
}
function resetDatabase () {
- return Promise.all([destroyStrategies(), destroyFeatures()]);
+ return BPromise.all([destroyStrategies(), destroyFeatures()]);
}
function setupDatabase () {
- return Promise.all([createStrategies(), createFeatures()]);
+ return BPromise.all([createStrategies(), createFeatures()]);
}
module.exports = {
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 785c8bd5e2..9b88d6a8aa 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
@@ -17,8 +17,8 @@ describe('FeatureForm', () => {
describe('new', () => {
it('should render empty form', () => {
Component = TestUtils .renderIntoDocument(