From eaa20927c01de03ab67ceff69dbace2069700718 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Wed, 13 Mar 2019 08:58:00 +0100 Subject: [PATCH] chore: Fix linting --- frontend/.travis.yml | 2 ++ frontend/src/component/api/show-api-details-container.jsx | 5 +---- frontend/src/component/common/index.js | 6 ++++-- .../component/feature/form/form-view-feature-component.jsx | 3 ++- frontend/src/component/feature/form/strategy-configure.jsx | 4 +++- .../component/feature/variant/update-variant-component.jsx | 3 ++- frontend/src/component/history/history-container.js | 5 +---- frontend/src/component/menu/header.jsx | 5 +---- frontend/src/component/user/show-user-component.jsx | 3 ++- frontend/src/component/user/show-user-container.jsx | 5 +---- .../src/store/ui-config/__tests__/ui-config-store.test.js | 2 -- 11 files changed, 19 insertions(+), 24 deletions(-) diff --git a/frontend/.travis.yml b/frontend/.travis.yml index 1f38c41166..27269a4397 100644 --- a/frontend/.travis.yml +++ b/frontend/.travis.yml @@ -6,6 +6,8 @@ before_install: yarn global add greenkeeper-lockfile@1 before_script: greenkeeper-lockfile-update script: yarn run test:ci after_script: greenkeeper-lockfile-upload +cache: + yarn: true env: global: secure: F5bMAyZEYW7LBwV+L3sdW+jhA+4H9dKte70GlhtPQdjGuFM0bWb4DIyECOUj0HIVjLKq8lDx4jolbNDvjccecteGEgZEcHKCE/WRpOlB3R8WhQdsIk3j+FaMRQNI2aH6hmRVUysEf6RuTIcYcESIExP1eGcy79++Zon953uM26k6NYKvWjURkn8fLM/Bj6RXKZNBmzdCsvHNPSF6R+VC0rU3NdDBD+r89vA7cz9zkXCe5LYnVzcnzSrsBTExpZrc0PVDPxNBZrJdDSe9KsEWEO+Ag2kZAEmv2xedOCaFCO6PiniZgCBKkw2zQM4ittaP0NnK+QBtYOffhuxoGxqT953sz6UTtDJiYWy+68N57zECQr4TFTAL2F8Cjh2Z/KYO6jxlKGL/1kL2UO/1ovfjJeFfl+2tm/F1bYj7dYA+swS/72cDSH0nrrEuv6mAA5hWoLD3m55bqg9kwjYPO8skzlLNLJ2Q0k0kpd3c3zveNOF9cKZ87pFbShi5sWj3vWm8FMZudjday6MBjghGKGICI8NpQZFnETrthXWqUd5+PfxIqbEov5jZQAS0FrHc2wfIneRmBoP64ST9A5SA+9lA81qK7iw9eDi/e2/C7CsbgWtL4CTvk37HerCPTv2hDxZuUxgJ3p5QoOkdU+TWSvnY7Z+HnniRG0nMh90XLwQiBQU= diff --git a/frontend/src/component/api/show-api-details-container.jsx b/frontend/src/component/api/show-api-details-container.jsx index 35d681fc66..fbd71fc284 100644 --- a/frontend/src/component/api/show-api-details-container.jsx +++ b/frontend/src/component/api/show-api-details-container.jsx @@ -11,7 +11,4 @@ const mapStateToProps = state => ({ uiConfig: state.uiConfig.toJS(), }); -export default connect( - mapStateToProps, - mapDispatchToProps -)(ShowApiDetailsComponent); +export default connect(mapStateToProps, mapDispatchToProps)(ShowApiDetailsComponent); diff --git a/frontend/src/component/common/index.js b/frontend/src/component/common/index.js index 6d21dd885c..4d839b4a8d 100644 --- a/frontend/src/component/common/index.js +++ b/frontend/src/component/common/index.js @@ -69,12 +69,14 @@ DataTableHeader.propTypes = { export const FormButtons = ({ submitText = 'Create', onCancel }) => (
 
); diff --git a/frontend/src/component/feature/form/form-view-feature-component.jsx b/frontend/src/component/feature/form/form-view-feature-component.jsx index 3fa862c5a6..7cc3ebdf64 100644 --- a/frontend/src/component/feature/form/form-view-feature-component.jsx +++ b/frontend/src/component/feature/form/form-view-feature-component.jsx @@ -13,7 +13,8 @@ class ViewFeatureComponent extends Component {
); diff --git a/frontend/src/component/feature/form/strategy-configure.jsx b/frontend/src/component/feature/form/strategy-configure.jsx index a15e217a61..0bd5397ec2 100644 --- a/frontend/src/component/feature/form/strategy-configure.jsx +++ b/frontend/src/component/feature/form/strategy-configure.jsx @@ -162,7 +162,9 @@ class StrategyConfigure extends React.Component { item = ( -  {name} + +   + {name} {this.props.strategyDefinition.description} {inputFields && ( diff --git a/frontend/src/component/feature/variant/update-variant-component.jsx b/frontend/src/component/feature/variant/update-variant-component.jsx index cc9ed390bd..dc0e290c94 100644 --- a/frontend/src/component/feature/variant/update-variant-component.jsx +++ b/frontend/src/component/feature/variant/update-variant-component.jsx @@ -106,7 +106,8 @@ class UpdateVariantComponent extends Component { supports variants. You should read more about variants in the  user documentation - . + + .

The sum of variants weights needs to be a constant number to guarantee consistent hashing in the diff --git a/frontend/src/component/history/history-container.js b/frontend/src/component/history/history-container.js index 16879af2bd..ee79b6cd61 100644 --- a/frontend/src/component/history/history-container.js +++ b/frontend/src/component/history/history-container.js @@ -9,9 +9,6 @@ const mapStateToProps = state => { }; }; -const HistoryListContainer = connect( - mapStateToProps, - { fetchHistory } -)(HistoryComponent); +const HistoryListContainer = connect(mapStateToProps, { fetchHistory })(HistoryComponent); export default HistoryListContainer; diff --git a/frontend/src/component/menu/header.jsx b/frontend/src/component/menu/header.jsx index 1e6b6fe394..7685ac9b8d 100644 --- a/frontend/src/component/menu/header.jsx +++ b/frontend/src/component/menu/header.jsx @@ -49,7 +49,4 @@ class HeaderComponent extends PureComponent { } } -export default connect( - state => ({ uiConfig: state.uiConfig.toJS() }), - { fetchUIConfig } -)(HeaderComponent); +export default connect(state => ({ uiConfig: state.uiConfig.toJS() }), { fetchUIConfig })(HeaderComponent); diff --git a/frontend/src/component/user/show-user-component.jsx b/frontend/src/component/user/show-user-component.jsx index 140f7af47d..e84b3d85ac 100644 --- a/frontend/src/component/user/show-user-component.jsx +++ b/frontend/src/component/user/show-user-component.jsx @@ -46,7 +46,8 @@ export default class ShowUserComponent extends React.Component {

{locale} -
  +
+  
{email}
diff --git a/frontend/src/component/user/show-user-container.jsx b/frontend/src/component/user/show-user-container.jsx index b6c18817b9..acb836e5ec 100644 --- a/frontend/src/component/user/show-user-container.jsx +++ b/frontend/src/component/user/show-user-container.jsx @@ -13,7 +13,4 @@ const mapStateToProps = state => ({ location: state.settings ? state.settings.toJS().location : {}, }); -export default connect( - mapStateToProps, - mapDispatchToProps -)(ShowUserComponent); +export default connect(mapStateToProps, mapDispatchToProps)(ShowUserComponent); diff --git a/frontend/src/store/ui-config/__tests__/ui-config-store.test.js b/frontend/src/store/ui-config/__tests__/ui-config-store.test.js index 3b3c6a2133..cf765a1616 100644 --- a/frontend/src/store/ui-config/__tests__/ui-config-store.test.js +++ b/frontend/src/store/ui-config/__tests__/ui-config-store.test.js @@ -1,4 +1,3 @@ -import { AssertionError } from 'assert'; import reducer from '../index'; import { receiveConfig } from '../actions'; @@ -19,7 +18,6 @@ test('should be merged state all', () => { }); test('should only update headerBackground', () => { - localStorage.clear(); const uiConfig = { headerBackground: 'black', };