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:
parent
eef0a47497
commit
119e091de4
@ -1,4 +1,4 @@
|
||||
{
|
||||
"lerna": "2.0.0-beta.29",
|
||||
"lerna": "2.0.0-beta.30",
|
||||
"version": "independent"
|
||||
}
|
||||
|
10
package.json
10
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"
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const express = require('express');
|
||||
const favicon = require('serve-favicon');
|
||||
const bodyParser = require('body-parser');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const knex = require('knex');
|
||||
|
||||
module.exports = function (databaseConnection) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const EVENT_COLUMNS = ['id', 'type', 'created_by', 'created_at', 'data'];
|
||||
|
||||
module.exports = function (db) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('../eventType');
|
||||
const logger = require('../logger');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('../eventType');
|
||||
const logger = require('../logger');
|
||||
const NotFoundError = require('../error/NotFoundError');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
|
||||
function NameExistsError (message) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
|
||||
function NotFoundError (message) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
|
||||
function ValidationError (message) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const ValidationError = require('./ValidationError');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const eventType = require('./eventType');
|
||||
const diff = require('deep-diff').diff;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const util = require('util');
|
||||
const EventEmitter = require('events').EventEmitter;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
featureCreated: 'feature-created',
|
||||
featureUpdated: 'feature-updated',
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
function extractUsername (req) {
|
||||
return req.cookies.username || 'unknown';
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const log4js = require('log4js');
|
||||
|
||||
log4js.clearAppenders();
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const eventDiffer = require('../eventDiffer');
|
||||
const version = 1;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const logger = require('../logger');
|
||||
const eventType = require('../eventType');
|
||||
const ValidationError = require('../error/ValidationError');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const logger = require('../logger');
|
||||
const eventType = require('../eventType');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const logger = require('../logger');
|
||||
|
||||
module.exports = function (app, config) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
const eventType = require('../eventType');
|
||||
const logger = require('../logger');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('001-initial-schema');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('002-add-description-to-features');
|
||||
|
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('003-add-parameters-template-to-strategies');
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('004-insert-default-strategy-event');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('005-archived-flag-to-features');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('006-rename-eventtype');
|
||||
|
@ -1,2 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('../scripts/migration-runner').create('007-add-strategies-to-features');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const util = require('util');
|
||||
const path = require('path');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const logger = require('./lib/logger');
|
||||
const migrator = require('./migrator');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
function getDatabaseUri () {
|
||||
if (!process.env.TEST_DATABASE_URL) {
|
||||
throw new Error('please set TEST_DATABASE_URL');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const request = require('./specHelper').request;
|
||||
|
||||
describe('The event api', () => {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const logger = require('../../lib/logger');
|
||||
const assert = require('assert');
|
||||
const specHelper = require('./specHelper');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const assert = require('assert');
|
||||
const specHelper = require('./specHelper');
|
||||
const request = specHelper.request;
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const specHelper = require('./specHelper');
|
||||
const request = specHelper.request;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
const BPromise = require('bluebird');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const specHelper = require('./specHelper');
|
||||
const request = specHelper.request;
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const eventDiffer = require('../../lib/eventDiffer');
|
||||
const eventType = require('../../lib/eventType');
|
||||
const assert = require('assert');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const assert = require('assert');
|
||||
|
||||
const mapper = require('../../../lib/helper/legacy-feature-mapper');
|
||||
|
@ -1,3 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
const unleash = require('unleash-server');
|
||||
unleash.start({});
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
|
@ -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>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
// docs: http://webpack.github.io/docs/configuration.html
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const server = require('unleash-api');
|
||||
|
||||
const unleash = server.start({});
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Router = require('react-router');
|
||||
const Menu = require('./components/Menu');
|
||||
|
@ -1,5 +1,4 @@
|
||||
/** @jsx React.DOM */
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../../components/Menu');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../../../components/feature/ArchiveFeatureComponent');
|
||||
jest.mock('../../../stores/FeatureToggleActions');
|
||||
jest.autoMockOff();
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../../../components/feature/FeatureForm');
|
||||
|
||||
const React = require('react/addons');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../../../components/feature/FeatureList');
|
||||
jest.dontMock('../../../components/feature/Feature');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
jest.autoMockOff();
|
||||
jest.dontMock('../../stores/FeatureToggleActions');
|
||||
jest.dontMock('../../stores/FeatureToggleStore');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Router = require('react-router');
|
||||
const UserStore = require('./stores/UserStore');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Ui = require('./ErrorMessages.ui');
|
||||
const ErrorStore = require('../stores/ErrorStore');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const ErrorMessages = React.createClass({
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const User = require('./User');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const UserStore = require('../stores/UserStore');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const FeatureActions = require('../../stores/FeatureToggleActions');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const FeatureForm = require('./FeatureForm');
|
||||
const LogEntryList = require('../log/LogEntryList');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const TextInput = require('../form/TextInput');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Feature = require('./Feature');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const FeatureList = require('./FeatureList');
|
||||
const FeatureForm = require('./FeatureForm');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const TextInput = React.createClass({
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const LogEntryList = require('./LogEntryList');
|
||||
const eventStore = require('../../stores/EventStore');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const moment = require('moment');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const LogEntry = require('./LogEntry');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const StrategyList = require('./StrategyList');
|
||||
const StrategyForm = require('./StrategyForm');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const Strategy = React.createClass({
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const TextInput = require('../form/TextInput');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Strategy = require('./Strategy');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const Router = require('react-router');
|
||||
const UnleashApp = require('./UnleashApp');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const FeatureActions = require('./FeatureToggleActions');
|
||||
const filter = require('lodash/collection/filter');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
|
||||
const ErrorActions = Reflux.createActions([
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const FeatureActions = require('./FeatureToggleActions');
|
||||
const ErrorActions = require('./ErrorActions');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const reqwest = require('reqwest');
|
||||
|
||||
const TYPE = 'json';
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const Server = require('./FeatureToggleServerFacade');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const reqwest = require('reqwest');
|
||||
|
||||
const TYPE = 'json';
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const FeatureActions = require('./FeatureToggleActions');
|
||||
const filter = require('lodash/collection/filter');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const reqwest = require('reqwest');
|
||||
|
||||
const TYPE = 'json';
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const StrategyAPI = require('./StrategyAPI');
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Reflux = require('reflux');
|
||||
const StrategyActions = require('./StrategyActions');
|
||||
const filter = require('lodash/collection/filter');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
let _username;
|
||||
|
||||
// Ref: http://stackoverflow.com/questions/10730362/get-cookie-by-name
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const FeatureToggleActions = require('./FeatureToggleActions');
|
||||
const StrategyActions = require('./StrategyActions');
|
||||
const Timer = require('../utils/Timer');
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const Timer = function (cb, interval) {
|
||||
this.cb = cb;
|
||||
this.interval = interval;
|
||||
|
@ -1,5 +1,4 @@
|
||||
// docs: http://webpack.github.io/docs/configuration.html
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
process.env.NODE_ENV = 'production';
|
||||
|
@ -1,4 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
const unleash = require('unleash-api');
|
||||
const { publicFolder } = require('unleash-frontend');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user