Commit 5b053984 authored by ZeHiro's avatar ZeHiro
Browse files

Fix deprecated lint rule following eslint upgrade + fix lint

parent 49ceac60
......@@ -134,12 +134,9 @@
- 2
react/jsx-sort-props:
- 0 # lolno
react/jsx-space-before-closing:
react/jsx-tag-spacing:
- 2
- "always"
#react/jsx-tag-spacing:
# - 2
# - { closingSlash: "never", beforeSelfClosing: "always", afterOpening: "never" }
- { closingSlash: "never", beforeSelfClosing: "always", afterOpening: "never" }
react/jsx-uses-react:
- 2
react/jsx-uses-vars:
......
......@@ -37,14 +37,15 @@ class CategoryList extends React.Component {
}
render() {
let items = this.props.categories.map(cat =>
let items = this.props.categories.map(cat => (
<CategoryListItem
cat={ cat }
categories={ this.props.categories }
updateCategory={ this.props.updateCategory }
deleteCategory={ this.props.deleteCategory }
key={ cat.id }
/>);
/>
));
let maybeForm = (
this.state.showForm ?
......
......@@ -114,12 +114,13 @@ class CategoryListItem extends React.Component {
let replacementOptions = this.props.categories
.filter(cat => cat.id !== c.id)
.map(cat =>
.map(cat => (
<option
key={ cat.id }
value={ cat.id }>
{ cat.title }
</option>);
</option>
));
replacementOptions = [
<option
......
......@@ -67,13 +67,13 @@ class SearchComponent extends React.Component {
{ $t('client.search.any_type') }
</option>
].concat(
this.props.operationTypes.map(type =>
this.props.operationTypes.map(type => (
<option
key={ type.name }
value={ type.name }>
{ $t(`client.${type.name}`) }
</option>
)
))
);
let handleKeyword = event => {
......
......@@ -45,13 +45,13 @@ class CustomBankField extends React.Component {
switch (this.props.params.type) {
case 'select':
customFieldOptions = this.props.params.values.map(opt =>
customFieldOptions = this.props.params.values.map(opt => (
<option
key={ opt.value }
value={ opt.value }>
{ opt.label }
</option>
);
));
defaultValue = this.props.params.currentValue || this.props.params.default;
customFieldFormInput = (
<select
......
......@@ -114,13 +114,13 @@ class NewBankForm extends React.Component {
return this.renderHeader(<div className="transition-expand" />);
}
let options = this.props.banks.map(bank =>
let options = this.props.banks.map(bank => (
<option
key={ bank.id }
value={ bank.uuid }>
{ bank.name }
</option>
);
));
let selectedBank = this.selectedBank();
......
......@@ -11,12 +11,12 @@ export default connect(state => {
accesses: get.accesses(state)
};
})(props => {
let accesses = props.accesses.map(access =>
let accesses = props.accesses.map(access => (
<BankAccessItem
key={ access.id }
access={ access }
/>
);
));
return (
<div key="bank-accesses-section" >
<NewBankForm expanded={ false } />
......
......@@ -24,11 +24,12 @@ export default connect((state, props) => {
};
})(props => {
let access = props.access;
let accounts = props.accounts.map(acc =>
let accounts = props.accounts.map(acc => (
<AccountItem
key={ acc.id }
account={ acc }
/>);
/>)
);
return (
<div
......
......@@ -16,13 +16,13 @@ class AccountSelector extends React.Component {
}
render() {
let options = this.props.pairs.map(pair =>
let options = this.props.pairs.map(pair => (
<option
key={ pair.key }
value={ pair.key }>
{ pair.val }
</option>
);
));
let refSelector = selector => {
this.selector = selector;
......
......@@ -10,14 +10,14 @@ import AlertItem from './alert-item';
const Alerts = props => {
let items = props.alerts.map(pair =>
let items = props.alerts.map(pair => (
<AlertItem
key={ pair.alert.id }
alert={ pair.alert }
account={ pair.account }
sendIfText={ props.sendIfText }
/>
);
));
return (
<div className="top-panel panel panel-default">
......
......@@ -8,13 +8,13 @@ import ReportCreationModal from './report-form-modal';
import ReportItem from './report-item';
let Reports = props => {
let items = props.reports.map(pair =>
let items = props.reports.map(pair => (
<ReportItem
key={ pair.alert.id }
alert={ pair.alert }
account={ pair.account }
/>
);
));
return (
<div className="top-panel panel panel-default">
......
import React from 'react';
import PropTypes from 'prop-types';
const BoolSetting = props =>
const BoolSetting = props => (
<div className="form-group clearfix">
<label className="col-xs-4 control-label">
{ props.label }
......@@ -13,7 +13,8 @@ const BoolSetting = props =>
onChange={ props.onChange }
/>
</div>
</div>;
</div>
);
BoolSetting.propTypes = {
// Label describing what the setting is all about.
......
......@@ -31,13 +31,13 @@ class SelectableButtonComponent extends React.Component {
let options = [];
if (this.state.editMode) {
options = this.props.optionsArray.map(o =>
options = this.props.optionsArray.map(o => (
<option
key={ o.id }
value={ o.id }>
{ this.props.idToDescriptor(o.id)[0] }
</option>
);
));
} else {
options = [
<option
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment