chore(lint): Enable no-useless-concat.
This commit is contained in:
Родитель
1c2fe326d2
Коммит
9c30201918
|
@ -136,6 +136,7 @@
|
|||
"no-unneeded-ternary": 2,
|
||||
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
|
||||
"no-useless-call": 2,
|
||||
"no-useless-concat": 2,
|
||||
"no-useless-constructor": 2,
|
||||
"no-var": 2,
|
||||
"no-void": 2,
|
||||
|
|
|
@ -45,7 +45,7 @@ const Search = React.createClass({
|
|||
const numSuggestions = this.props.formHistory.concat(this.props.suggestions).length;
|
||||
const numEngines = this.props.engines.length;
|
||||
if (index < numSuggestions) {
|
||||
return "search-suggestions-" + "history-search-suggestions-" + index;
|
||||
return `${index < this.props.formHistory.length ? "history-" : ""}search-suggestions-${index}`;
|
||||
} else if (index < numSuggestions + numEngines) {
|
||||
return "search-partners-" + (index - numSuggestions);
|
||||
} else if (index === numSuggestions + numEngines) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче