aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/common
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-04-20 11:10:13 +0200
committerGitHub <noreply@github.com>2017-04-20 11:10:13 +0200
commitf6e90fdc19e222b3b238f0f5995a8039b7db158e (patch)
tree69c22415cb50a650b046ce4b9a9ac99e57695dfd /server/sonar-web/src/main/js/components/common
parent36c9fa041018d7eed91f1d22e0c5eda075737ebc (diff)
downloadsonarqube-f6e90fdc19e222b3b238f0f5995a8039b7db158e.tar.gz
sonarqube-f6e90fdc19e222b3b238f0f5995a8039b7db158e.zip
upgrade prettier (#1954)
Diffstat (limited to 'server/sonar-web/src/main/js/components/common')
-rw-r--r--server/sonar-web/src/main/js/components/common/BubblePopupHelper.js6
-rw-r--r--server/sonar-web/src/main/js/components/common/MultiSelect.js12
-rw-r--r--server/sonar-web/src/main/js/components/common/MultiSelectOption.js2
-rw-r--r--server/sonar-web/src/main/js/components/common/SelectList.js2
-rw-r--r--server/sonar-web/src/main/js/components/common/SelectListItem.js4
-rw-r--r--server/sonar-web/src/main/js/components/common/modal-form.js9
-rw-r--r--server/sonar-web/src/main/js/components/common/modals.js11
7 files changed, 20 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/components/common/BubblePopupHelper.js b/server/sonar-web/src/main/js/components/common/BubblePopupHelper.js
index 2873b55e9ce..81923c806ba 100644
--- a/server/sonar-web/src/main/js/components/common/BubblePopupHelper.js
+++ b/server/sonar-web/src/main/js/components/common/BubblePopupHelper.js
@@ -30,7 +30,7 @@ type Props = {
},
popup: Object,
position: 'bottomleft' | 'bottomright',
- togglePopup: (?boolean) => void
+ togglePopup: ?boolean => void
};
type State = {
@@ -92,13 +92,13 @@ export default class BubblePopupHelper extends React.PureComponent {
return (
<div
className={classNames(this.props.className, 'bubble-popup-helper')}
- ref={container => this.container = container}
+ ref={container => (this.container = container)}
onClick={this.handleClick}
tabIndex={0}
role="tooltip">
{this.props.children}
{this.props.isOpen &&
- <div ref={popupContainer => this.popupContainer = popupContainer}>
+ <div ref={popupContainer => (this.popupContainer = popupContainer)}>
{React.cloneElement(this.props.popup, {
popupPosition: this.state.position
})}
diff --git a/server/sonar-web/src/main/js/components/common/MultiSelect.js b/server/sonar-web/src/main/js/components/common/MultiSelect.js
index 2faa0f2ef81..2c75904d706 100644
--- a/server/sonar-web/src/main/js/components/common/MultiSelect.js
+++ b/server/sonar-web/src/main/js/components/common/MultiSelect.js
@@ -27,10 +27,10 @@ type Props = {
selectedElements: Array<string>,
elements: Array<string>,
listSize: number,
- onSearch: (string) => void,
- onSelect: (string) => void,
- onUnselect: (string) => void,
- validateSearchInput: (string) => string
+ onSearch: string => void,
+ onSelect: string => void,
+ onUnselect: string => void,
+ validateSearchInput: string => string
};
type State = {
@@ -225,7 +225,7 @@ export default class MultiSelect extends React.PureComponent {
const activeElement = this.getAllElements(this.props, this.state)[activeIdx];
return (
- <div className="multi-select" ref={div => this.container = div}>
+ <div className="multi-select" ref={div => (this.container = div)}>
<div className="search-box menu-search">
<button className="search-box-submit button-clean">
<i className="icon-search-new" />
@@ -237,7 +237,7 @@ export default class MultiSelect extends React.PureComponent {
placeholder={translate('search_verb')}
onChange={this.handleSearchChange}
autoComplete="off"
- ref={input => this.searchInput = input}
+ ref={input => (this.searchInput = input)}
/>
</div>
<ul className="menu">
diff --git a/server/sonar-web/src/main/js/components/common/MultiSelectOption.js b/server/sonar-web/src/main/js/components/common/MultiSelectOption.js
index 0699f3e72d0..02291254fc1 100644
--- a/server/sonar-web/src/main/js/components/common/MultiSelectOption.js
+++ b/server/sonar-web/src/main/js/components/common/MultiSelectOption.js
@@ -27,7 +27,7 @@ type Props = {
custom: boolean,
active: boolean,
onSelectChange: (string, boolean) => void,
- onHover: (string) => void
+ onHover: string => void
};
export default class MultiSelectOption extends React.PureComponent {
diff --git a/server/sonar-web/src/main/js/components/common/SelectList.js b/server/sonar-web/src/main/js/components/common/SelectList.js
index bec5c2e6712..d5695f82a22 100644
--- a/server/sonar-web/src/main/js/components/common/SelectList.js
+++ b/server/sonar-web/src/main/js/components/common/SelectList.js
@@ -27,7 +27,7 @@ type Props = {
children?: SelectListItem,
items: Array<string>,
currentItem: string,
- onSelect: (string) => void
+ onSelect: string => void
};
type State = {
diff --git a/server/sonar-web/src/main/js/components/common/SelectListItem.js b/server/sonar-web/src/main/js/components/common/SelectListItem.js
index 44dbf517296..e5bc30cdca6 100644
--- a/server/sonar-web/src/main/js/components/common/SelectListItem.js
+++ b/server/sonar-web/src/main/js/components/common/SelectListItem.js
@@ -26,8 +26,8 @@ type Props = {
active?: string,
children?: React.Element<*>,
item: string,
- onSelect?: (string) => void,
- onHover?: (string) => void,
+ onSelect?: string => void,
+ onHover?: string => void,
title?: string
};
diff --git a/server/sonar-web/src/main/js/components/common/modal-form.js b/server/sonar-web/src/main/js/components/common/modal-form.js
index dc766b2188a..2629ce5b077 100644
--- a/server/sonar-web/src/main/js/components/common/modal-form.js
+++ b/server/sonar-web/src/main/js/components/common/modal-form.js
@@ -37,12 +37,9 @@ export default ModalView.extend({
onRender() {
ModalView.prototype.onRender.apply(this, arguments);
const that = this;
- setTimeout(
- () => {
- that.$(':tabbable').first().focus();
- },
- 0
- );
+ setTimeout(() => {
+ that.$(':tabbable').first().focus();
+ }, 0);
},
onInputKeydown(e) {
diff --git a/server/sonar-web/src/main/js/components/common/modals.js b/server/sonar-web/src/main/js/components/common/modals.js
index a86a262d40c..7e8da099663 100644
--- a/server/sonar-web/src/main/js/components/common/modals.js
+++ b/server/sonar-web/src/main/js/components/common/modals.js
@@ -53,13 +53,10 @@ export default Marionette.ItemView.extend({
show() {
const that = this;
- setTimeout(
- () => {
- that.$el.addClass('in');
- $('.' + that.overlayClassName).addClass('in');
- },
- 0
- );
+ setTimeout(() => {
+ that.$el.addClass('in');
+ $('.' + that.overlayClassName).addClass('in');
+ }, 0);
},
onDestroy() {