apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -25,10 +25,7 @@ class Autocomplete extends React.Component<Props, State> {
noOptionsMessage: "No suggestion available"
};
handleInputChange = (
newValue: ValueType<SelectValue>,
action: ActionMeta
) => {
handleInputChange = (newValue: ValueType<SelectValue>, action: ActionMeta) => {
this.selectValue(newValue as SelectValue);
};
@@ -42,9 +39,7 @@ class Autocomplete extends React.Component<Props, State> {
selectValue: ValueType<SelectValue>,
selectOptions: readonly SelectValue[]
): boolean => {
const isNotDuplicated = !selectOptions
.map(option => option.label)
.includes(inputValue);
const isNotDuplicated = !selectOptions.map(option => option.label).includes(inputValue);
const isNotEmpty = inputValue !== "";
return isNotEmpty && isNotDuplicated;
};