1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Upgrade and fix lint

This commit is contained in:
Simen Bekkhus 2016-10-26 10:43:11 +02:00
parent eef0a47497
commit 119e091de4
No known key found for this signature in database
GPG Key ID: F8DE8DC2A9CDB9FF
87 changed files with 91 additions and 13 deletions

View File

@ -1,4 +1,4 @@
{
"lerna": "2.0.0-beta.29",
"lerna": "2.0.0-beta.30",
"version": "independent"
}

View File

@ -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"
}
}

View File

@ -1,4 +1,5 @@
'use strict';
const express = require('express');
const favicon = require('serve-favicon');
const bodyParser = require('body-parser');

View File

@ -1,4 +1,5 @@
'use strict';
const knex = require('knex');
module.exports = function (databaseConnection) {

View File

@ -1,4 +1,5 @@
'use strict';
const EVENT_COLUMNS = ['id', 'type', 'created_by', 'created_at', 'data'];
module.exports = function (db) {

View File

@ -1,4 +1,5 @@
'use strict';
const eventType = require('../eventType');
const logger = require('../logger');
const NotFoundError = require('../error/NotFoundError');

View File

@ -1,4 +1,5 @@
'use strict';
const eventType = require('../eventType');
const logger = require('../logger');
const NotFoundError = require('../error/NotFoundError');

View File

@ -1,4 +1,5 @@
'use strict';
const util = require('util');
function NameExistsError (message) {

View File

@ -1,4 +1,5 @@
'use strict';
const util = require('util');
function NotFoundError (message) {

View File

@ -1,4 +1,5 @@
'use strict';
const util = require('util');
function ValidationError (message) {

View File

@ -1,4 +1,5 @@
'use strict';
const BPromise = require('bluebird');
const ValidationError = require('./ValidationError');

View File

@ -1,4 +1,5 @@
'use strict';
const eventType = require('./eventType');
const diff = require('deep-diff').diff;

View File

@ -1,4 +1,5 @@
'use strict';
const util = require('util');
const EventEmitter = require('events').EventEmitter;

View File

@ -1,4 +1,5 @@
'use strict';
module.exports = {
featureCreated: 'feature-created',
featureUpdated: 'feature-updated',

View File

@ -1,4 +1,5 @@
'use strict';
function extractUsername (req) {
return req.cookies.username || 'unknown';
}

View File

@ -1,4 +1,5 @@
'use strict';
const log4js = require('log4js');
log4js.clearAppenders();

View File

@ -1,4 +1,5 @@
'use strict';
const eventDiffer = require('../eventDiffer');
const version = 1;

View File

@ -1,4 +1,5 @@
'use strict';
const logger = require('../logger');
const eventType = require('../eventType');
const ValidationError = require('../error/ValidationError');

View File

@ -1,4 +1,5 @@
'use strict';
const BPromise = require('bluebird');
const logger = require('../logger');
const eventType = require('../eventType');

View File

@ -1,4 +1,5 @@
'use strict';
const logger = require('../logger');
module.exports = function (app, config) {

View File

@ -1,4 +1,5 @@
'use strict';
const BPromise = require('bluebird');
const eventType = require('../eventType');
const logger = require('../logger');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('001-initial-schema');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('002-add-description-to-features');

View File

@ -1,3 +1,4 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('003-add-parameters-template-to-strategies');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy-event');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('005-archived-flag-to-features');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('006-rename-eventtype');

View File

@ -1,2 +1,3 @@
'use strict';
module.exports = require('../scripts/migration-runner').create('007-add-strategies-to-features');

View File

@ -1,4 +1,5 @@
'use strict';
const fs = require('fs');
const util = require('util');
const path = require('path');

View File

@ -1,4 +1,5 @@
'use strict';
const logger = require('./lib/logger');
const migrator = require('./migrator');

View File

@ -1,4 +1,5 @@
'use strict';
function getDatabaseUri () {
if (!process.env.TEST_DATABASE_URL) {
throw new Error('please set TEST_DATABASE_URL');

View File

@ -1,4 +1,5 @@
'use strict';
const request = require('./specHelper').request;
describe('The event api', () => {

View File

@ -1,4 +1,5 @@
'use strict';
const logger = require('../../lib/logger');
const assert = require('assert');
const specHelper = require('./specHelper');

View File

@ -1,4 +1,5 @@
'use strict';
const assert = require('assert');
const specHelper = require('./specHelper');
const request = specHelper.request;

View File

@ -1,4 +1,5 @@
'use strict';
const specHelper = require('./specHelper');
const request = specHelper.request;

View File

@ -1,4 +1,5 @@
'use strict';
process.env.NODE_ENV = 'test';
const BPromise = require('bluebird');

View File

@ -1,4 +1,5 @@
'use strict';
const specHelper = require('./specHelper');
const request = specHelper.request;

View File

@ -1,4 +1,5 @@
'use strict';
const eventDiffer = require('../../lib/eventDiffer');
const eventType = require('../../lib/eventType');
const assert = require('assert');

View File

@ -1,4 +1,5 @@
'use strict';
const assert = require('assert');
const mapper = require('../../../lib/helper/legacy-feature-mapper');

View File

@ -1,3 +1,4 @@
'use strict';
const unleash = require('unleash-server');
unleash.start({});

View File

@ -1,4 +1,5 @@
'use strict';
const path = require('path');
module.exports = {

View File

@ -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 => (
<Input
@ -59,7 +58,10 @@ class ConfigureStrategies extends React.Component {
if (!this.props.strategyDefinition) {
return (
<ListItem leftActions={leftActions} caption={<span style={{ color: 'red' }}>Strategy "{this.props.strategy.name}" deleted</span>}/>
<ListItem
leftActions={leftActions}
caption={<span style={{ color: 'red' }}>Strategy "{this.props.strategy.name}" deleted</span>}
/>
);
}

View File

@ -1,5 +1,4 @@
// docs: http://webpack.github.io/docs/configuration.html
'use strict';
const path = require('path');

View File

@ -1,4 +1,5 @@
'use strict';
const path = require('path');
module.exports = {

View File

@ -1,4 +1,5 @@
'use strict';
const server = require('unleash-api');
const unleash = server.start({});

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Router = require('react-router');
const Menu = require('./components/Menu');

View File

@ -1,5 +1,4 @@
/** @jsx React.DOM */
'use strict';
jest.dontMock('../../components/Menu');

View File

@ -1,4 +1,5 @@
'use strict';
jest.dontMock('../../../components/feature/ArchiveFeatureComponent');
jest.mock('../../../stores/FeatureToggleActions');
jest.autoMockOff();

View File

@ -1,4 +1,5 @@
'use strict';
jest.dontMock('../../../components/feature/FeatureForm');
const React = require('react/addons');

View File

@ -1,4 +1,5 @@
'use strict';
jest.dontMock('../../../components/feature/FeatureList');
jest.dontMock('../../../components/feature/Feature');

View File

@ -1,4 +1,5 @@
'use strict';
jest.autoMockOff();
jest.dontMock('../../stores/FeatureToggleActions');
jest.dontMock('../../stores/FeatureToggleStore');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Router = require('react-router');
const UserStore = require('./stores/UserStore');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Ui = require('./ErrorMessages.ui');
const ErrorStore = require('../stores/ErrorStore');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const ErrorMessages = React.createClass({

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const User = require('./User');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const UserStore = require('../stores/UserStore');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const FeatureActions = require('../../stores/FeatureToggleActions');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const FeatureForm = require('./FeatureForm');
const LogEntryList = require('../log/LogEntryList');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const TextInput = require('../form/TextInput');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Feature = require('./Feature');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const FeatureList = require('./FeatureList');
const FeatureForm = require('./FeatureForm');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const TextInput = React.createClass({

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const LogEntryList = require('./LogEntryList');
const eventStore = require('../../stores/EventStore');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const moment = require('moment');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const LogEntry = require('./LogEntry');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const StrategyList = require('./StrategyList');
const StrategyForm = require('./StrategyForm');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Strategy = React.createClass({

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const TextInput = require('../form/TextInput');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Strategy = require('./Strategy');

View File

@ -1,4 +1,5 @@
'use strict';
const React = require('react');
const Router = require('react-router');
const UnleashApp = require('./UnleashApp');

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const FeatureActions = require('./FeatureToggleActions');
const filter = require('lodash/collection/filter');

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const ErrorActions = Reflux.createActions([

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const FeatureActions = require('./FeatureToggleActions');
const ErrorActions = require('./ErrorActions');

View File

@ -1,4 +1,5 @@
'use strict';
const reqwest = require('reqwest');
const TYPE = 'json';

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const Server = require('./FeatureToggleServerFacade');

View File

@ -1,4 +1,5 @@
'use strict';
const reqwest = require('reqwest');
const TYPE = 'json';

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const FeatureActions = require('./FeatureToggleActions');
const filter = require('lodash/collection/filter');

View File

@ -1,4 +1,5 @@
'use strict';
const reqwest = require('reqwest');
const TYPE = 'json';

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const StrategyAPI = require('./StrategyAPI');

View File

@ -1,4 +1,5 @@
'use strict';
const Reflux = require('reflux');
const StrategyActions = require('./StrategyActions');
const filter = require('lodash/collection/filter');

View File

@ -1,4 +1,5 @@
'use strict';
let _username;
// Ref: http://stackoverflow.com/questions/10730362/get-cookie-by-name

View File

@ -1,4 +1,5 @@
'use strict';
const FeatureToggleActions = require('./FeatureToggleActions');
const StrategyActions = require('./StrategyActions');
const Timer = require('../utils/Timer');

View File

@ -1,4 +1,5 @@
'use strict';
const Timer = function (cb, interval) {
this.cb = cb;
this.interval = interval;

View File

@ -1,5 +1,4 @@
// docs: http://webpack.github.io/docs/configuration.html
'use strict';
const path = require('path');

View File

@ -1,5 +1,4 @@
#!/usr/bin/env node
'use strict';
process.env.NODE_ENV = 'production';

View File

@ -1,4 +1,5 @@
'use strict';
const unleash = require('unleash-api');
const { publicFolder } = require('unleash-frontend');