aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-08-29 11:38:53 +0200
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-09-13 13:53:58 +0200
commit793e86fce66f356099792b7231c9a1d949ff875e (patch)
tree8bd08099539c3cb1ff159823ee1d1f74a5f2c979 /server/sonar-web/src/main/js/components
parent736e89cc1629e1e52db00f67e4650f1b88695de9 (diff)
downloadsonarqube-793e86fce66f356099792b7231c9a1d949ff875e.tar.gz
sonarqube-793e86fce66f356099792b7231c9a1d949ff875e.zip
update prettier
Diffstat (limited to 'server/sonar-web/src/main/js/components')
-rw-r--r--server/sonar-web/src/main/js/components/SelectList/index.js14
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js10
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.js62
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.js35
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/Line.js24
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.js14
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.js14
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.js12
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.js12
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.js5
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.js4
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.js5
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js23
-rw-r--r--server/sonar-web/src/main/js/components/charts/AdvancedTimeline.js34
-rw-r--r--server/sonar-web/src/main/js/components/charts/BubbleChart.js50
-rw-r--r--server/sonar-web/src/main/js/components/charts/ColorBoxLegend.js9
-rw-r--r--server/sonar-web/src/main/js/components/charts/ColorGradientLegend.js13
-rw-r--r--server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.js4
-rw-r--r--server/sonar-web/src/main/js/components/charts/TreeMap.js8
-rw-r--r--server/sonar-web/src/main/js/components/charts/TreeMapRect.js15
-rw-r--r--server/sonar-web/src/main/js/components/charts/ZoomTimeLine.js36
-rw-r--r--server/sonar-web/src/main/js/components/charts/bar-chart.js22
-rw-r--r--server/sonar-web/src/main/js/components/charts/donut-chart.js12
-rw-r--r--server/sonar-web/src/main/js/components/charts/histogram.js22
-rw-r--r--server/sonar-web/src/main/js/components/charts/line-chart.js24
-rw-r--r--server/sonar-web/src/main/js/components/charts/word-cloud.js12
-rw-r--r--server/sonar-web/src/main/js/components/common/BranchStatus.tsx20
-rw-r--r--server/sonar-web/src/main/js/components/common/BubblePopupHelper.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/common/DeferredSpinner.js8
-rw-r--r--server/sonar-web/src/main/js/components/common/EmptySearch.js13
-rw-r--r--server/sonar-web/src/main/js/components/common/LocationMessage.css2
-rw-r--r--server/sonar-web/src/main/js/components/common/MarkdownTips.js12
-rw-r--r--server/sonar-web/src/main/js/components/common/MultiSelect.js13
-rw-r--r--server/sonar-web/src/main/js/components/common/SelectList.js4
-rw-r--r--server/sonar-web/src/main/js/components/common/UpgradeOrganizationBox.js13
-rw-r--r--server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx54
-rw-r--r--server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.js8
-rw-r--r--server/sonar-web/src/main/js/components/common/action-options-view.js16
-rw-r--r--server/sonar-web/src/main/js/components/common/modal-form.js5
-rw-r--r--server/sonar-web/src/main/js/components/controls/DateInput.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/controls/GlobalMessages.js6
-rw-r--r--server/sonar-web/src/main/js/components/controls/RadioToggle.tsx10
-rw-r--r--server/sonar-web/src/main/js/components/controls/SearchSelect.js8
-rw-r--r--server/sonar-web/src/main/js/components/controls/styles.css2
-rw-r--r--server/sonar-web/src/main/js/components/facet/FacetBox.js6
-rw-r--r--server/sonar-web/src/main/js/components/facet/FacetHeader.js55
-rw-r--r--server/sonar-web/src/main/js/components/facet/FacetItem.js30
-rw-r--r--server/sonar-web/src/main/js/components/facet/FacetItemsList.js6
-rw-r--r--server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx8
-rw-r--r--server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js48
-rw-r--r--server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/intl/TimeTooltipFormatter.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/issue/IssueView.js14
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.js10
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueAssign.js5
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.js6
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.js4
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.js10
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js31
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.js7
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.js9
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.js4
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js9
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.js4
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.js4
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.js51
-rw-r--r--server/sonar-web/src/main/js/components/measure/Measure.js10
-rw-r--r--server/sonar-web/src/main/js/components/nav/NavBar.css4
-rw-r--r--server/sonar-web/src/main/js/components/nav/NavBar.tsx4
-rw-r--r--server/sonar-web/src/main/js/components/select-list/list.js6
-rw-r--r--server/sonar-web/src/main/js/components/shared/Organization.js12
-rw-r--r--server/sonar-web/src/main/js/components/shared/TypeHelper.js5
-rw-r--r--server/sonar-web/src/main/js/components/tags/TagsList.js4
-rw-r--r--server/sonar-web/src/main/js/components/ui/DuplicationsRating.css2
-rw-r--r--server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/ui/Level.tsx6
-rw-r--r--server/sonar-web/src/main/js/components/ui/Rating.js6
-rw-r--r--server/sonar-web/src/main/js/components/ui/SizeRating.js6
-rw-r--r--server/sonar-web/src/main/js/components/widgets/barchart.js4
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js8
80 files changed, 549 insertions, 564 deletions
diff --git a/server/sonar-web/src/main/js/components/SelectList/index.js b/server/sonar-web/src/main/js/components/SelectList/index.js
index 23e2c7184eb..af02287019c 100644
--- a/server/sonar-web/src/main/js/components/SelectList/index.js
+++ b/server/sonar-web/src/main/js/components/SelectList/index.js
@@ -202,9 +202,12 @@ const SelectListView = Backbone.View.extend({
this.$listContainer = this.$('.select-list-list-container');
if (!this.settings.readOnly) {
- this.$listContainer.height(this.settings.height).css('overflow', 'auto').on('scroll', () => {
- that.scroll();
- });
+ this.$listContainer
+ .height(this.settings.height)
+ .css('overflow', 'auto')
+ .on('scroll', () => {
+ that.scroll();
+ });
} else {
this.$listContainer.addClass('select-list-list-container-readonly');
}
@@ -230,7 +233,10 @@ const SelectListView = Backbone.View.extend({
}
that.$el.prevAll('.alert').remove();
- $('<div>').addClass('alert alert-danger').text(message).insertBefore(that.$el);
+ $('<div>')
+ .addClass('alert alert-danger')
+ .text(message)
+ .insertBefore(that.$el);
};
if (this.settings.readOnly) {
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js
index 9f41c7a8a8e..6d3a4378b2f 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js
@@ -653,14 +653,16 @@ export default class SourceViewerBase extends React.PureComponent {
component={this.state.component}
showMeasures={this.showMeasures}
/>
- {notAccessible &&
+ {notAccessible && (
<div className="alert alert-warning spacer-top">
{translate('code_viewer.no_source_code_displayed_due_to_security')}
- </div>}
- {sourceRemoved &&
+ </div>
+ )}
+ {sourceRemoved && (
<div className="alert alert-warning spacer-top">
{translate('code_viewer.no_source_code_displayed_due_to_source_removed')}
- </div>}
+ </div>
+ )}
{displaySources && sources != null && this.renderCode(sources)}
</div>
);
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.js
index f928aa8f5fc..55fb081c59d 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.js
@@ -198,21 +198,24 @@ export default class SourceViewerCode extends React.PureComponent {
return (
<div>
- {this.props.hasSourcesBefore &&
+ {this.props.hasSourcesBefore && (
<div className="source-viewer-more-code">
- {this.props.loadingSourcesBefore
- ? <div className="js-component-viewer-loading-before">
- <i className="spinner" />
- <span className="note spacer-left">
- {translate('source_viewer.loading_more_code')}
- </span>
- </div>
- : <button
- className="js-component-viewer-source-before"
- onClick={this.props.loadSourcesBefore}>
- {translate('source_viewer.load_more_code')}
- </button>}
- </div>}
+ {this.props.loadingSourcesBefore ? (
+ <div className="js-component-viewer-loading-before">
+ <i className="spinner" />
+ <span className="note spacer-left">
+ {translate('source_viewer.loading_more_code')}
+ </span>
+ </div>
+ ) : (
+ <button
+ className="js-component-viewer-source-before"
+ onClick={this.props.loadSourcesBefore}>
+ {translate('source_viewer.load_more_code')}
+ </button>
+ )}
+ </div>
+ )}
<table className="source-table">
<tbody>
@@ -231,21 +234,24 @@ export default class SourceViewerCode extends React.PureComponent {
</tbody>
</table>
- {this.props.hasSourcesAfter &&
+ {this.props.hasSourcesAfter && (
<div className="source-viewer-more-code">
- {this.props.loadingSourcesAfter
- ? <div className="js-component-viewer-loading-after">
- <i className="spinner" />
- <span className="note spacer-left">
- {translate('source_viewer.loading_more_code')}
- </span>
- </div>
- : <button
- className="js-component-viewer-source-after"
- onClick={this.props.loadSourcesAfter}>
- {translate('source_viewer.load_more_code')}
- </button>}
- </div>}
+ {this.props.loadingSourcesAfter ? (
+ <div className="js-component-viewer-loading-after">
+ <i className="spinner" />
+ <span className="note spacer-left">
+ {translate('source_viewer.loading_more_code')}
+ </span>
+ </div>
+ ) : (
+ <button
+ className="js-component-viewer-source-after"
+ onClick={this.props.loadSourcesAfter}>
+ {translate('source_viewer.load_more_code')}
+ </button>
+ )}
+ </div>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.js b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.js
index 991ec78a765..282f7211b1a 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.js
@@ -96,18 +96,20 @@ export default class SourceViewerHeader extends React.PureComponent {
</Link>
</div>
- {subProject != null &&
+ {subProject != null && (
<div className="component-name-parent">
<Link to={getProjectUrl(subProject, this.props.branch)} className="link-with-icon">
<QualifierIcon qualifier="BRC" /> <span>{subProjectName}</span>
</Link>
- </div>}
+ </div>
+ )}
<div className="component-name-path">
<QualifierIcon qualifier={q} /> <span>{collapsedDirFromPath(path)}</span>
<span className="component-name-file">{fileFromPath(path)}</span>
- {this.props.component.canMarkAsFavorite &&
- <FavoriteContainer className="component-name-favorite" componentKey={key} />}
+ {this.props.component.canMarkAsFavorite && (
+ <FavoriteContainer className="component-name-favorite" componentKey={key} />
+ )}
</div>
</div>
</div>
@@ -135,12 +137,13 @@ export default class SourceViewerHeader extends React.PureComponent {
{translate('component_viewer.new_window')}
</Link>
</li>
- {!workspace &&
+ {!workspace && (
<li>
<a className="js-workspace" href="#" onClick={this.openInWorkspace}>
{translate('component_viewer.open_in_workspace')}
</a>
- </li>}
+ </li>
+ )}
<li>
<a className="js-raw-source" href={rawSourcesLink} target="_blank">
{translate('component_viewer.show_raw_source')}
@@ -150,7 +153,7 @@ export default class SourceViewerHeader extends React.PureComponent {
</div>
<div className="source-viewer-header-measures">
- {isUnitTest &&
+ {isUnitTest && (
<div className="source-viewer-header-measure">
<span className="source-viewer-header-measure-value">
{formatMeasure(measures.tests, 'SHORT_INT')}
@@ -158,9 +161,10 @@ export default class SourceViewerHeader extends React.PureComponent {
<span className="source-viewer-header-measure-label">
{translate('metric.tests.name')}
</span>
- </div>}
+ </div>
+ )}
- {!isUnitTest &&
+ {!isUnitTest && (
<div className="source-viewer-header-measure">
<span className="source-viewer-header-measure-value">
{formatMeasure(measures.lines, 'SHORT_INT')}
@@ -168,7 +172,8 @@ export default class SourceViewerHeader extends React.PureComponent {
<span className="source-viewer-header-measure-label">
{translate('metric.lines.name')}
</span>
- </div>}
+ </div>
+ )}
<div className="source-viewer-header-measure">
<span className="source-viewer-header-measure-value">
@@ -189,7 +194,7 @@ export default class SourceViewerHeader extends React.PureComponent {
</span>
</div>
- {measures.coverage != null &&
+ {measures.coverage != null && (
<div className="source-viewer-header-measure">
<span className="source-viewer-header-measure-value">
{formatMeasure(measures.coverage, 'PERCENT')}
@@ -197,9 +202,10 @@ export default class SourceViewerHeader extends React.PureComponent {
<span className="source-viewer-header-measure-label">
{translate('metric.coverage.name')}
</span>
- </div>}
+ </div>
+ )}
- {measures.duplicationDensity != null &&
+ {measures.duplicationDensity != null && (
<div className="source-viewer-header-measure">
<span className="source-viewer-header-measure-value">
{formatMeasure(measures.duplicationDensity, 'PERCENT')}
@@ -207,7 +213,8 @@ export default class SourceViewerHeader extends React.PureComponent {
<span className="source-viewer-header-measure-label">
{translate('duplications')}
</span>
- </div>}
+ </div>
+ )}
</div>
</div>
);
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.js b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.js
index 10f84254b27..1d81eb24712 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.js
@@ -113,13 +113,15 @@ export default class Line extends React.PureComponent {
previousLine={this.props.previousLine}
/>
- {this.props.displayCoverage &&
- <LineCoverage line={line} onClick={this.props.onCoverageClick} />}
+ {this.props.displayCoverage && (
+ <LineCoverage line={line} onClick={this.props.onCoverageClick} />
+ )}
- {this.props.displayDuplications &&
- <LineDuplications line={line} onClick={this.props.loadDuplications} />}
+ {this.props.displayDuplications && (
+ <LineDuplications line={line} onClick={this.props.loadDuplications} />
+ )}
- {times(duplicationsCount).map(index =>
+ {times(duplicationsCount).map(index => (
<LineDuplicationBlock
duplicated={duplications.includes(index)}
index={index}
@@ -127,20 +129,22 @@ export default class Line extends React.PureComponent {
line={this.props.line}
onClick={this.props.onDuplicationClick}
/>
- )}
+ ))}
{this.props.displayIssues &&
- !this.props.displayAllIssues &&
+ !this.props.displayAllIssues && (
<LineIssuesIndicator
issues={this.props.issues}
line={line}
onClick={this.handleIssuesIndicatorClick}
- />}
+ />
+ )}
- {this.props.displayFiltered &&
+ {this.props.displayFiltered && (
<td className="source-meta source-line-filtered-container" data-line-number={line.line}>
<div className="source-line-bar" />
- </td>}
+ </td>
+ )}
<LineCode
highlightedLocationMessage={this.props.highlightedLocationMessage}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.js
index e2bd3eaeb7e..63782ced438 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.js
@@ -142,10 +142,7 @@ export default class LineCode extends React.PureComponent {
<span href="#" ref={ref}>
{index + 1}
</span>
- {message != null &&
- <LocationMessage selected={true}>
- {message}
- </LocationMessage>}
+ {message != null && <LocationMessage selected={true}>{message}</LocationMessage>}
</LocationIndex>
);
}
@@ -213,12 +210,10 @@ export default class LineCode extends React.PureComponent {
return (
<td className={className} data-line-number={line.line}>
<div className="source-line-code-inner">
- <pre ref={node => (this.codeNode = node)}>
- {renderedTokens}
- </pre>
+ <pre ref={node => (this.codeNode = node)}>{renderedTokens}</pre>
</div>
{showIssues &&
- issues.length > 0 &&
+ issues.length > 0 && (
<LineIssuesList
issues={issues}
onIssueChange={this.props.onIssueChange}
@@ -226,7 +221,8 @@ export default class LineCode extends React.PureComponent {
onPopupToggle={this.props.onPopupToggle}
openPopup={this.props.openPopup}
selectedIssue={selectedIssue}
- />}
+ />
+ )}
</td>
);
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.js
index 70d3bc3d258..a8821c57a24 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineCoverage.js
@@ -54,12 +54,12 @@ export default class LineCoverage extends React.PureComponent {
</td>
);
- return line.coverageStatus != null
- ? <Tooltip
- overlay={translate('source_viewer.tooltip', line.coverageStatus)}
- placement="right">
- {cell}
- </Tooltip>
- : cell;
+ return line.coverageStatus != null ? (
+ <Tooltip overlay={translate('source_viewer.tooltip', line.coverageStatus)} placement="right">
+ {cell}
+ </Tooltip>
+ ) : (
+ cell
+ );
}
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.js
index c079ee52490..396d7244dee 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplicationBlock.js
@@ -60,10 +60,12 @@ export default class LineDuplicationBlock extends React.PureComponent {
</td>
);
- return duplicated
- ? <Tooltip overlay={translate('source_viewer.tooltip.duplicated_block')} placement="right">
- {cell}
- </Tooltip>
- : cell;
+ return duplicated ? (
+ <Tooltip overlay={translate('source_viewer.tooltip.duplicated_block')} placement="right">
+ {cell}
+ </Tooltip>
+ ) : (
+ cell
+ );
}
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.js
index 2e394b89b9c..4c5c90a7e0f 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineDuplications.js
@@ -55,10 +55,12 @@ export default class LineDuplications extends React.PureComponent {
</td>
);
- return line.duplicated
- ? <Tooltip overlay={translate('source_viewer.tooltip.duplicated_line')} placement="right">
- {cell}
- </Tooltip>
- : cell;
+ return line.duplicated ? (
+ <Tooltip overlay={translate('source_viewer.tooltip.duplicated_line')} placement="right">
+ {cell}
+ </Tooltip>
+ ) : (
+ cell
+ );
}
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.js
index 1c3db0733f5..43a7b4561a0 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.js
@@ -57,10 +57,7 @@ export default class LineIssuesIndicator extends React.PureComponent {
tabIndex={hasIssues ? '0' : undefined}
onClick={hasIssues ? this.handleClick : undefined}>
{mostImportantIssue != null && <SeverityIcon severity={mostImportantIssue.severity} />}
- {issues.length > 1 &&
- <span className="source-line-issues-counter">
- {issues.length}
- </span>}
+ {issues.length > 1 && <span className="source-line-issues-counter">{issues.length}</span>}
</td>
);
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.js
index 470cf536cea..e3f12d153be 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.js
@@ -41,7 +41,7 @@ export default class LineIssuesList extends React.PureComponent {
return (
<div className="issue-list">
- {issues.map(issue =>
+ {issues.map(issue => (
<Issue
issue={issue}
key={issue.key}
@@ -51,7 +51,7 @@ export default class LineIssuesList extends React.PureComponent {
openPopup={openPopup && openPopup.issue === issue.key ? openPopup.name : null}
selected={selectedIssue === issue.key}
/>
- )}
+ ))}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.js b/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.js
index abcaa287007..01ef4805057 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.js
@@ -55,8 +55,9 @@ export default class LineSCM extends React.PureComponent {
role={clickable ? 'button' : undefined}
tabIndex={clickable ? 0 : undefined}
onClick={clickable ? this.handleClick : undefined}>
- {this.isSCMChanged(line, previousLine) &&
- <div className="source-line-scm-inner" data-author={line.scmAuthor} />}
+ {this.isSCMChanged(line, previousLine) && (
+ <div className="source-line-scm-inner" data-author={line.scmAuthor} />
+ )}
</td>
);
}
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
index d9d7eb25c31..e9db36ae7b7 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
@@ -74,16 +74,27 @@ export default ModalView.extend({
const radius = options.size / 2;
const container = select(this);
- const svg = container.append('svg').attr('width', options.size).attr('height', options.size);
+ const svg = container
+ .append('svg')
+ .attr('width', options.size)
+ .attr('height', options.size);
const plot = svg.append('g').attr('transform', trans(radius, radius));
- const arc = d3Arc().innerRadius(radius - options.thickness).outerRadius(radius);
- const pie = d3Pie().sort(null).value(d => d);
+ const arc = d3Arc()
+ .innerRadius(radius - options.thickness)
+ .outerRadius(radius);
+ const pie = d3Pie()
+ .sort(null)
+ .value(d => d);
const colors = function(i) {
return i === 0 ? options.color : options.baseColor;
};
const sectors = plot.selectAll('path').data(pie(data));
- sectors.enter().append('path').style('fill', (d, i) => colors(i)).attr('d', arc);
+ sectors
+ .enter()
+ .append('path')
+ .style('fill', (d, i) => colors(i))
+ .attr('d', arc);
});
},
@@ -250,7 +261,9 @@ export default ModalView.extend({
const testId = $(e.currentTarget).data('id');
const url = window.baseUrl + '/api/tests/covered_files';
const options = { testId };
- this.testsScroll = $(e.currentTarget).scrollParent().scrollTop();
+ this.testsScroll = $(e.currentTarget)
+ .scrollParent()
+ .scrollTop();
return $.get(url, options).done(data => {
this.coveredFiles = data.files;
this.selectedTest = this.tests.find(test => test.id === testId);
diff --git a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.js b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.js
index d359b8c0e54..eb566d16706 100644
--- a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.js
+++ b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.js
@@ -134,10 +134,14 @@ export default class AdvancedTimeline extends React.PureComponent {
}
getRatingScale = (availableHeight /*: number */) =>
- scalePoint().domain([5, 4, 3, 2, 1]).range([availableHeight, 0]);
+ scalePoint()
+ .domain([5, 4, 3, 2, 1])
+ .range([availableHeight, 0]);
getLevelScale = (availableHeight /*: number */) =>
- scalePoint().domain(['ERROR', 'WARN', 'OK']).range([availableHeight, 0]);
+ scalePoint()
+ .domain(['ERROR', 'WARN', 'OK'])
+ .range([availableHeight, 0]);
getYScale = (props /*: Props */, availableHeight /*: number */, flatData /*: Array<Point> */) => {
if (props.metricType === 'RATING') {
@@ -160,7 +164,10 @@ export default class AdvancedTimeline extends React.PureComponent {
const dateRange = extent(flatData, d => d.x);
const start = startDate && startDate > dateRange[0] ? startDate : dateRange[0];
const end = endDate && endDate < dateRange[1] ? endDate : dateRange[1];
- const xScale = scaleTime().domain(sortBy([start, end])).range([0, availableWidth]).clamp(false);
+ const xScale = scaleTime()
+ .domain(sortBy([start, end]))
+ .range([0, availableWidth])
+ .clamp(false);
return {
xScale,
maxXRange: dateRange.map(xScale)
@@ -302,9 +309,9 @@ export default class AdvancedTimeline extends React.PureComponent {
return (
<g>
- {ticks.map(tick =>
+ {ticks.map(tick => (
<g key={tick}>
- {formatYTick != null &&
+ {formatYTick != null && (
<text
className="line-chart-tick line-chart-tick-x"
dx="-1em"
@@ -313,7 +320,8 @@ export default class AdvancedTimeline extends React.PureComponent {
x={xScale.range()[0]}
y={yScale(tick)}>
{formatYTick(tick)}
- </text>}
+ </text>
+ )}
<line
className="line-chart-grid"
x1={xScale.range()[0]}
@@ -322,7 +330,7 @@ export default class AdvancedTimeline extends React.PureComponent {
y2={yScale(tick)}
/>
</g>
- )}
+ ))}
</g>
);
};
@@ -376,13 +384,13 @@ export default class AdvancedTimeline extends React.PureComponent {
}
return (
<g>
- {this.props.series.map((serie, idx) =>
+ {this.props.series.map((serie, idx) => (
<path
key={serie.name}
className={classNames('line-chart-path', 'line-chart-path-' + idx)}
d={lineGenerator(serie.data)}
/>
- )}
+ ))}
</g>
);
};
@@ -398,13 +406,13 @@ export default class AdvancedTimeline extends React.PureComponent {
}
return (
<g>
- {this.props.series.map((serie, idx) =>
+ {this.props.series.map((serie, idx) => (
<path
key={serie.name}
className={classNames('line-chart-area', 'line-chart-area-' + idx)}
d={areaGenerator(serie.data)}
/>
- )}
+ ))}
</g>
);
};
@@ -421,14 +429,14 @@ export default class AdvancedTimeline extends React.PureComponent {
const offset = eventSize / 2;
return (
<g>
- {inRangeEvents.map((event, idx) =>
+ {inRangeEvents.map((event, idx) => (
<path
d={this.getEventMarker(eventSize)}
className={classNames('line-chart-event', event.className)}
key={`${idx}-${event.date.getTime()}`}
transform={`translate(${xScale(event.date) - offset}, ${yScale.range()[0] + offset})`}
/>
- )}
+ ))}
</g>
);
};
diff --git a/server/sonar-web/src/main/js/components/charts/BubbleChart.js b/server/sonar-web/src/main/js/components/charts/BubbleChart.js
index 3426761dc5f..4b733da414c 100644
--- a/server/sonar-web/src/main/js/components/charts/BubbleChart.js
+++ b/server/sonar-web/src/main/js/components/charts/BubbleChart.js
@@ -77,20 +77,16 @@ export class Bubble extends React.PureComponent {
);
if (this.props.link && !this.props.onClick) {
- circle = (
- <Link to={this.props.link}>
- {circle}
- </Link>
- );
+ circle = <Link to={this.props.link}>{circle}</Link>;
}
- return this.props.tooltip
- ? <TooltipsContainer>
- <g>
- {circle}
- </g>
- </TooltipsContainer>
- : circle;
+ return this.props.tooltip ? (
+ <TooltipsContainer>
+ <g>{circle}</g>
+ </TooltipsContainer>
+ ) : (
+ circle
+ );
}
}
@@ -166,11 +162,7 @@ export default class BubbleChart extends React.PureComponent {
return <line key={index} x1={x} x2={x} y1={y1} y2={y2} className="bubble-chart-grid" />;
});
- return (
- <g ref="xGrid">
- {lines}
- </g>
- );
+ return <g ref="xGrid">{lines}</g>;
}
renderYGrid(ticks /*: Array<number> */, xScale /*: Scale */, yScale /*: Scale */) {
@@ -185,11 +177,7 @@ export default class BubbleChart extends React.PureComponent {
return <line key={index} x1={x1} x2={x2} y1={y} y2={y} className="bubble-chart-grid" />;
});
- return (
- <g ref="yGrid">
- {lines}
- </g>
- );
+ return <g ref="yGrid">{lines}</g>;
}
renderXTicks(xTicks /*: Array<number> */, xScale /*: Scale */, yScale /*: Scale */) {
@@ -208,11 +196,7 @@ export default class BubbleChart extends React.PureComponent {
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
}
renderYTicks(yTicks /*: Array<number> */, xScale /*: Scale */, yScale /*: Scale */) {
@@ -237,11 +221,7 @@ export default class BubbleChart extends React.PureComponent {
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
}
renderChart(width /*: number */) {
@@ -298,10 +278,6 @@ export default class BubbleChart extends React.PureComponent {
}
render() {
- return (
- <AutoSizer disableHeight={true}>
- {size => this.renderChart(size.width)}
- </AutoSizer>
- );
+ return <AutoSizer disableHeight={true}>{size => this.renderChart(size.width)}</AutoSizer>;
}
}
diff --git a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.js b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.js
index da60f2f7ab1..4c6633c26b1 100644
--- a/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.js
+++ b/server/sonar-web/src/main/js/components/charts/ColorBoxLegend.js
@@ -36,7 +36,7 @@ export default function ColorBoxLegend(
const colorRange = colorScale.range();
return (
<div className={classNames('color-box-legend', className)}>
- {colorDomain.map((value, idx) =>
+ {colorDomain.map((value, idx) => (
<div key={value}>
<span className="color-box-legend-rect" style={{ borderColor: colorRange[idx] }}>
<span
@@ -46,14 +46,15 @@ export default function ColorBoxLegend(
</span>
{formatMeasure(value, metricType)}
</div>
- )}
- {colorNA &&
+ ))}
+ {colorNA && (
<div>
<span className="color-box-legend-rect" style={{ borderColor: colorNA }}>
<span className="color-box-legend-rect-inner" style={{ backgroundColor: colorNA }} />
</span>
N/A
- </div>}
+ </div>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.js b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.js
index e67d19644c9..78b09098b1e 100644
--- a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.js
+++ b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.js
@@ -57,14 +57,14 @@ export default function ColorGradientLegend(
<svg className={className} width={width} height={height}>
<defs>
<linearGradient id="gradient-legend">
- {colorRange.map((color, idx) =>
+ {colorRange.map((color, idx) => (
<stop key={idx} offset={idx / lastColorIdx} stopColor={color} />
- )}
+ ))}
</linearGradient>
</defs>
<g transform={`translate(${padding[3]}, ${padding[0]})`}>
<rect fill="url(#gradient-legend)" x={0} y={0} height={rectHeight} width={widthNoPadding} />
- {colorDomain.map((d, idx) =>
+ {colorDomain.map((d, idx) => (
<text
className="gradient-legend-text"
key={idx}
@@ -73,9 +73,9 @@ export default function ColorGradientLegend(
dy="-2px">
{d}
</text>
- )}
+ ))}
</g>
- {colorNA &&
+ {colorNA && (
<g transform={`translate(${widthNoPadding}, ${padding[0]})`}>
<rect
fill={colorNA}
@@ -91,7 +91,8 @@ export default function ColorGradientLegend(
dy="-2px">
N/A
</text>
- </g>}
+ </g>
+ )}
</svg>
);
}
diff --git a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.js b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.js
index 67017ea7d80..daa623fb780 100644
--- a/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.js
+++ b/server/sonar-web/src/main/js/components/charts/ColorRatingsLegend.js
@@ -26,7 +26,7 @@ import { RATING_COLORS } from '../../helpers/constants';
export default function ColorRatingsLegend({ className } /*: { className?: string } */) {
return (
<div className={classNames('color-box-legend', className)}>
- {[1, 2, 3, 4, 5].map(rating =>
+ {[1, 2, 3, 4, 5].map(rating => (
<div key={rating}>
<span
className="color-box-legend-rect"
@@ -38,7 +38,7 @@ export default function ColorRatingsLegend({ className } /*: { className?: strin
</span>
{formatMeasure(rating, 'RATING')}
</div>
- )}
+ ))}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/charts/TreeMap.js b/server/sonar-web/src/main/js/components/charts/TreeMap.js
index 21ae66da1bb..256a5afb1d2 100644
--- a/server/sonar-web/src/main/js/components/charts/TreeMap.js
+++ b/server/sonar-web/src/main/js/components/charts/TreeMap.js
@@ -80,7 +80,9 @@ export default class TreeMap extends React.PureComponent {
.sum(d => d.size)
.sort((a, b) => b.value - a.value);
- const treemap = d3Treemap().round(true).size([width, height]);
+ const treemap = d3Treemap()
+ .round(true)
+ .size([width, height]);
const nodes = treemap(hierarchy).leaves();
const prefix = this.mostCommitPrefix(items.map(item => item.label));
@@ -88,7 +90,7 @@ export default class TreeMap extends React.PureComponent {
return (
<div className="sonar-d3">
<div className="treemap-container" style={{ width, height }}>
- {nodes.map(node =>
+ {nodes.map(node => (
<TreeMapRect
key={node.data.key}
x={node.x0}
@@ -105,7 +107,7 @@ export default class TreeMap extends React.PureComponent {
onClick={this.props.onRectangleClick}
placement={node.x0 === 0 || node.x1 < halfWidth ? 'right' : 'left'}
/>
- )}
+ ))}
</div>
</div>
);
diff --git a/server/sonar-web/src/main/js/components/charts/TreeMapRect.js b/server/sonar-web/src/main/js/components/charts/TreeMapRect.js
index 357bd6e5c4e..42013d0cf2b 100644
--- a/server/sonar-web/src/main/js/components/charts/TreeMapRect.js
+++ b/server/sonar-web/src/main/js/components/charts/TreeMapRect.js
@@ -25,7 +25,10 @@ import { scaleLinear } from 'd3-scale';
import LinkIcon from '../icons-components/LinkIcon';
import Tooltip from '../controls/Tooltip';
-const SIZE_SCALE = scaleLinear().domain([3, 15]).range([11, 18]).clamp(true);
+const SIZE_SCALE = scaleLinear()
+ .domain([3, 15])
+ .range([11, 18])
+ .clamp(true);
/*:: type Props = {|
x: number,
@@ -93,12 +96,14 @@ export default class TreeMapRect extends React.PureComponent {
role="treeitem"
tabIndex={0}>
<div className="treemap-inner" style={{ maxWidth: this.props.width }}>
- {isIconVisible &&
+ {isIconVisible && (
<span className={classNames('treemap-icon', { 'spacer-right': isTextVisible })}>
{this.props.icon}
- </span>}
- {isTextVisible &&
- <span className="treemap-text" dangerouslySetInnerHTML={{ __html: label }} />}
+ </span>
+ )}
+ {isTextVisible && (
+ <span className="treemap-text" dangerouslySetInnerHTML={{ __html: label }} />
+ )}
</div>
{this.renderLink()}
</div>
diff --git a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.js b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.js
index 22205dfdf73..ec1957e2f5b 100644
--- a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.js
+++ b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.js
@@ -71,10 +71,14 @@ export default class ZoomTimeLine extends React.PureComponent {
}
getRatingScale = (availableHeight /*: number */) =>
- scalePoint().domain([5, 4, 3, 2, 1]).range([availableHeight, 0]);
+ scalePoint()
+ .domain([5, 4, 3, 2, 1])
+ .range([availableHeight, 0]);
getLevelScale = (availableHeight /*: number */) =>
- scalePoint().domain(['ERROR', 'WARN', 'OK']).range([availableHeight, 0]);
+ scalePoint()
+ .domain(['ERROR', 'WARN', 'OK'])
+ .range([availableHeight, 0]);
getYScale = (availableHeight /*: number */, flatData /*: Array<Point> */) => {
if (this.props.metricType === 'RATING') {
@@ -82,12 +86,18 @@ export default class ZoomTimeLine extends React.PureComponent {
} else if (this.props.metricType === 'LEVEL') {
return this.getLevelScale(availableHeight);
} else {
- return scaleLinear().range([availableHeight, 0]).domain([0, max(flatData, d => d.y)]).nice();
+ return scaleLinear()
+ .range([availableHeight, 0])
+ .domain([0, max(flatData, d => d.y)])
+ .nice();
}
};
getXScale = (availableWidth /*: number */, flatData /*: Array<Point> */) =>
- scaleTime().domain(extent(flatData, d => d.x)).range([0, availableWidth]).clamp(true);
+ scaleTime()
+ .domain(extent(flatData, d => d.x))
+ .range([0, availableWidth])
+ .clamp(true);
getScales = () => {
const availableWidth = this.props.width - this.props.padding[1] - this.props.padding[3];
@@ -241,13 +251,13 @@ export default class ZoomTimeLine extends React.PureComponent {
}
return (
<g>
- {this.props.series.map((serie, idx) =>
+ {this.props.series.map((serie, idx) => (
<path
key={serie.name}
className={classNames('line-chart-path', 'line-chart-path-' + idx)}
d={lineGenerator(serie.data)}
/>
- )}
+ ))}
</g>
);
};
@@ -263,13 +273,13 @@ export default class ZoomTimeLine extends React.PureComponent {
}
return (
<g>
- {this.props.series.map((serie, idx) =>
+ {this.props.series.map((serie, idx) => (
<path
key={serie.name}
className={classNames('line-chart-area', 'line-chart-area-' + idx)}
d={areaGenerator(serie.data)}
/>
- )}
+ ))}
</g>
);
};
@@ -283,7 +293,7 @@ export default class ZoomTimeLine extends React.PureComponent {
xDim: Array<number>,
direction: string
} */
- ) =>
+ ) => (
<Draggable
axis="x"
bounds={{ left: options.xDim[0], right: options.xDim[1] }}
@@ -308,7 +318,8 @@ export default class ZoomTimeLine extends React.PureComponent {
height={options.yDim[0] - options.yDim[1] + 1}
width={6}
/>
- </Draggable>;
+ </Draggable>
+ );
renderZoom = (xScale /*: Scale */, yScale /*: Scale */) => {
const xRange = xScale.range();
@@ -338,7 +349,7 @@ export default class ZoomTimeLine extends React.PureComponent {
width={xDim[1] - xDim[0]}
/>
</DraggableCore>
- {showZoomArea &&
+ {showZoomArea && (
<Draggable
axis="x"
bounds={{ left: xDim[0], right: Math.floor(xDim[1] - zoomBoxWidth) }}
@@ -353,7 +364,8 @@ export default class ZoomTimeLine extends React.PureComponent {
width={zoomBoxWidth}
onDoubleClick={this.handleDoubleClick(xScale, xDim)}
/>
- </Draggable>}
+ </Draggable>
+ )}
{showZoomArea &&
this.renderZoomHandle({
xScale,
diff --git a/server/sonar-web/src/main/js/components/charts/bar-chart.js b/server/sonar-web/src/main/js/components/charts/bar-chart.js
index 37e847d580d..8e963366f67 100644
--- a/server/sonar-web/src/main/js/components/charts/bar-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/bar-chart.js
@@ -84,11 +84,7 @@ export const BarChart = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderXValues(xScale, yScale) {
@@ -119,11 +115,7 @@ export const BarChart = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderBars(xScale, yScale) {
@@ -151,11 +143,7 @@ export const BarChart = createReactClass({
/>
);
});
- return (
- <g>
- {bars}
- </g>
- );
+ return <g>{bars}</g>;
},
render() {
@@ -176,7 +164,9 @@ export const BarChart = createReactClass({
.domain(this.props.data.map(d => d.x))
.range([0, availableWidth])
.paddingInner(relativeInnerPadding);
- const yScale = scaleLinear().domain([0, maxY]).range([availableHeight, 0]);
+ const yScale = scaleLinear()
+ .domain([0, maxY])
+ .range([availableHeight, 0]);
return (
<TooltipsContainer>
diff --git a/server/sonar-web/src/main/js/components/charts/donut-chart.js b/server/sonar-web/src/main/js/components/charts/donut-chart.js
index 9acec66a199..6cbf26f5d8b 100644
--- a/server/sonar-web/src/main/js/components/charts/donut-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/donut-chart.js
@@ -25,7 +25,9 @@ import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
function Sector(props) {
- const arc = d3Arc().outerRadius(props.radius).innerRadius(props.radius - props.thickness);
+ const arc = d3Arc()
+ .outerRadius(props.radius)
+ .innerRadius(props.radius - props.thickness);
return <path d={arc(props.data)} style={{ fill: props.fill }} />;
}
@@ -57,7 +59,9 @@ export const DonutChart = createReactClass({
const size = Math.min(availableWidth, availableHeight);
const radius = Math.floor(size / 2);
- const pie = d3Pie().sort(null).value(d => d.value);
+ const pie = d3Pie()
+ .sort(null)
+ .value(d => d.value);
const sectors = pie(this.props.data).map((d, i) => {
return (
<Sector
@@ -73,9 +77,7 @@ export const DonutChart = createReactClass({
return (
<svg className="donut-chart" width={this.state.width} height={this.state.height}>
<g transform={`translate(${this.props.padding[3]}, ${this.props.padding[0]})`}>
- <g transform={`translate(${radius}, ${radius})`}>
- {sectors}
- </g>
+ <g transform={`translate(${radius}, ${radius})`}>{sectors}</g>
</g>
</svg>
);
diff --git a/server/sonar-web/src/main/js/components/charts/histogram.js b/server/sonar-web/src/main/js/components/charts/histogram.js
index ddf8726181e..2201cf025c0 100644
--- a/server/sonar-web/src/main/js/components/charts/histogram.js
+++ b/server/sonar-web/src/main/js/components/charts/histogram.js
@@ -86,11 +86,7 @@ export const Histogram = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderValues(xScale, yScale) {
@@ -115,11 +111,7 @@ export const Histogram = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderBars(xScale, yScale) {
@@ -140,11 +132,7 @@ export const Histogram = createReactClass({
/>
);
});
- return (
- <g>
- {bars}
- </g>
- );
+ return <g>{bars}</g>;
},
render() {
@@ -156,7 +144,9 @@ export const Histogram = createReactClass({
const availableHeight = this.state.height - this.props.padding[0] - this.props.padding[2];
const maxX = max(this.props.data, d => d.x);
- const xScale = scaleLinear().domain([0, maxX]).range([0, availableWidth]);
+ const xScale = scaleLinear()
+ .domain([0, maxX])
+ .range([0, availableWidth]);
const yScale = scaleBand()
.domain(this.props.data.map(d => d.y))
.rangeRound([0, availableHeight]);
diff --git a/server/sonar-web/src/main/js/components/charts/line-chart.js b/server/sonar-web/src/main/js/components/charts/line-chart.js
index ea56aa7e6ca..20df2fce140 100644
--- a/server/sonar-web/src/main/js/components/charts/line-chart.js
+++ b/server/sonar-web/src/main/js/components/charts/line-chart.js
@@ -87,11 +87,7 @@ export const LineChart = createReactClass({
const y = yScale(point.y);
return <circle key={index} className="line-chart-point" r="3" cx={x} cy={y} />;
});
- return (
- <g>
- {points}
- </g>
- );
+ return <g>{points}</g>;
},
renderVerticalGrid(xScale, yScale) {
@@ -104,11 +100,7 @@ export const LineChart = createReactClass({
const y2 = yScale(point.y);
return <line key={index} className="line-chart-grid" x1={x} x2={x} y1={y1} y2={y2} />;
});
- return (
- <g>
- {lines}
- </g>
- );
+ return <g>{lines}</g>;
},
renderXTicks(xScale, yScale) {
@@ -125,11 +117,7 @@ export const LineChart = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderXValues(xScale, yScale) {
@@ -146,11 +134,7 @@ export const LineChart = createReactClass({
</text>
);
});
- return (
- <g>
- {ticks}
- </g>
- );
+ return <g>{ticks}</g>;
},
renderLine(xScale, yScale) {
diff --git a/server/sonar-web/src/main/js/components/charts/word-cloud.js b/server/sonar-web/src/main/js/components/charts/word-cloud.js
index c7547ebdf87..8cc711a4eec 100644
--- a/server/sonar-web/src/main/js/components/charts/word-cloud.js
+++ b/server/sonar-web/src/main/js/components/charts/word-cloud.js
@@ -67,13 +67,13 @@ export const WordCloud = createReactClass({
const len = this.props.items.length;
const sortedItems = sortBy(this.props.items, (item, idx) => {
const index = len - idx;
- return index % 2 * (len - index) + index / 2;
+ return (index % 2) * (len - index) + index / 2;
});
const sizeScale = scaleLinear()
.domain([0, max(this.props.items, d => d.size)])
.range(this.props.sizeRange);
- const words = sortedItems.map((item, index) =>
+ const words = sortedItems.map((item, index) => (
<Word
key={index}
text={item.text}
@@ -81,11 +81,7 @@ export const WordCloud = createReactClass({
link={item.link}
tooltip={item.tooltip}
/>
- );
- return (
- <div className="word-cloud">
- {words}
- </div>
- );
+ ));
+ return <div className="word-cloud">{words}</div>;
}
});
diff --git a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx
index ae36462f6f5..ea1604dfa5c 100644
--- a/server/sonar-web/src/main/js/components/common/BranchStatus.tsx
+++ b/server/sonar-web/src/main/js/components/common/BranchStatus.tsx
@@ -51,25 +51,25 @@ export default function BranchStatus({ branch, concise = false }: Props) {
})}
/>
</li>
- {concise &&
- <li>
- {totalIssues}
- </li>}
- {!concise &&
+ {concise && <li>{totalIssues}</li>}
+ {!concise && (
<li>
{branch.status.bugs}
<BugIcon className="little-spacer-left" />
- </li>}
- {!concise &&
+ </li>
+ )}
+ {!concise && (
<li>
{branch.status.vulnerabilities}
<VulnerabilityIcon className="little-spacer-left" />
- </li>}
- {!concise &&
+ </li>
+ )}
+ {!concise && (
<li>
{branch.status.codeSmells}
<CodeSmellIcon className="little-spacer-left" />
- </li>}
+ </li>
+ )}
</ul>
);
} else {
diff --git a/server/sonar-web/src/main/js/components/common/BubblePopupHelper.tsx b/server/sonar-web/src/main/js/components/common/BubblePopupHelper.tsx
index f24365adf57..5ea55cabf6b 100644
--- a/server/sonar-web/src/main/js/components/common/BubblePopupHelper.tsx
+++ b/server/sonar-web/src/main/js/components/common/BubblePopupHelper.tsx
@@ -93,12 +93,13 @@ export default class BubblePopupHelper extends React.PureComponent<Props, State>
tabIndex={0}
role="tooltip">
{this.props.children}
- {this.props.isOpen &&
+ {this.props.isOpen && (
<div ref={popupContainer => (this.popupContainer = popupContainer)}>
{React.cloneElement(this.props.popup, {
popupPosition: this.state.position
})}
- </div>}
+ </div>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/common/DeferredSpinner.js b/server/sonar-web/src/main/js/components/common/DeferredSpinner.js
index 4224bdf786a..f638257ad79 100644
--- a/server/sonar-web/src/main/js/components/common/DeferredSpinner.js
+++ b/server/sonar-web/src/main/js/components/common/DeferredSpinner.js
@@ -80,8 +80,10 @@ export default class DeferredSpinner extends React.PureComponent {
};
render() {
- return this.state.showSpinner
- ? <i className={classNames('spinner', this.props.className)} />
- : this.props.children || null;
+ return this.state.showSpinner ? (
+ <i className={classNames('spinner', this.props.className)} />
+ ) : (
+ this.props.children || null
+ );
}
}
diff --git a/server/sonar-web/src/main/js/components/common/EmptySearch.js b/server/sonar-web/src/main/js/components/common/EmptySearch.js
index 8a426f4474c..719a2239c90 100644
--- a/server/sonar-web/src/main/js/components/common/EmptySearch.js
+++ b/server/sonar-web/src/main/js/components/common/EmptySearch.js
@@ -22,14 +22,11 @@ import React from 'react';
import { translate } from '../../helpers/l10n';
import './EmptySearch.css';
-const EmptySearch = () =>
+const EmptySearch = () => (
<div className="empty-search">
- <h3>
- {translate('no_results_search')}
- </h3>
- <p className="big-spacer-top">
- {translate('no_results_search.2')}
- </p>
- </div>;
+ <h3>{translate('no_results_search')}</h3>
+ <p className="big-spacer-top">{translate('no_results_search.2')}</p>
+ </div>
+);
export default EmptySearch;
diff --git a/server/sonar-web/src/main/js/components/common/LocationMessage.css b/server/sonar-web/src/main/js/components/common/LocationMessage.css
index 0d9951513c1..c2021568b94 100644
--- a/server/sonar-web/src/main/js/components/common/LocationMessage.css
+++ b/server/sonar-web/src/main/js/components/common/LocationMessage.css
@@ -34,7 +34,7 @@
border-top: 5px solid #475760;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
- content: "";
+ content: '';
}
.source-line-code .location-message {
diff --git a/server/sonar-web/src/main/js/components/common/MarkdownTips.js b/server/sonar-web/src/main/js/components/common/MarkdownTips.js
index b57bce846f0..12479be7596 100644
--- a/server/sonar-web/src/main/js/components/common/MarkdownTips.js
+++ b/server/sonar-web/src/main/js/components/common/MarkdownTips.js
@@ -35,15 +35,9 @@ export default class MarkdownTips extends React.PureComponent {
{translate('markdown.helplink')}
</a>
{':'}
- <span className="spacer-left">
- *{translate('bold')}*
- </span>
- <span className="spacer-left">
- ``{translate('code')}``
- </span>
- <span className="spacer-left">
- * {translate('bulleted_point')}
- </span>
+ <span className="spacer-left">*{translate('bold')}*</span>
+ <span className="spacer-left">``{translate('code')}``</span>
+ <span className="spacer-left">* {translate('bulleted_point')}</span>
</div>
);
}
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 2f7ca2aa923..2547da0d2b5 100644
--- a/server/sonar-web/src/main/js/components/common/MultiSelect.js
+++ b/server/sonar-web/src/main/js/components/common/MultiSelect.js
@@ -246,7 +246,7 @@ export default class MultiSelect extends React.PureComponent {
</div>
<ul className="menu">
{selectedElements.length > 0 &&
- selectedElements.map(element =>
+ selectedElements.map(element => (
<MultiSelectOption
key={element}
element={element}
@@ -255,9 +255,9 @@ export default class MultiSelect extends React.PureComponent {
onSelectChange={this.handleSelectChange}
onHover={this.handleElementHover}
/>
- )}
+ ))}
{unselectedElements.length > 0 &&
- unselectedElements.map(element =>
+ unselectedElements.map(element => (
<MultiSelectOption
key={element}
element={element}
@@ -265,8 +265,8 @@ export default class MultiSelect extends React.PureComponent {
onSelectChange={this.handleSelectChange}
onHover={this.handleElementHover}
/>
- )}
- {this.isNewElement(query, this.props) &&
+ ))}
+ {this.isNewElement(query, this.props) && (
<MultiSelectOption
key={query}
element={query}
@@ -274,7 +274,8 @@ export default class MultiSelect extends React.PureComponent {
active={activeElement === query}
onSelectChange={this.handleSelectChange}
onHover={this.handleElementHover}
- />}
+ />
+ )}
</ul>
</div>
);
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 02483a86e55..b235e9abec9 100644
--- a/server/sonar-web/src/main/js/components/common/SelectList.js
+++ b/server/sonar-web/src/main/js/components/common/SelectList.js
@@ -148,7 +148,7 @@ export default class SelectList extends React.PureComponent {
})
)}
{!hasChildren &&
- this.props.items.map(item =>
+ this.props.items.map(item => (
<SelectListItem
active={this.state.active}
item={item}
@@ -156,7 +156,7 @@ export default class SelectList extends React.PureComponent {
onHover={this.handleHover}
onSelect={this.handleSelect}
/>
- )}
+ ))}
</ul>
);
}
diff --git a/server/sonar-web/src/main/js/components/common/UpgradeOrganizationBox.js b/server/sonar-web/src/main/js/components/common/UpgradeOrganizationBox.js
index 35e56013aef..23456925d25 100644
--- a/server/sonar-web/src/main/js/components/common/UpgradeOrganizationBox.js
+++ b/server/sonar-web/src/main/js/components/common/UpgradeOrganizationBox.js
@@ -32,15 +32,11 @@ type Props = {
export default function UpgradeOrganizationBox(props /*: Props */) {
return (
<div className="boxed-group boxed-group-inner upgrade-organization-box">
- <h3 className="spacer-bottom">
- {translate('billing.upgrade_box.header')}
- </h3>
+ <h3 className="spacer-bottom">{translate('billing.upgrade_box.header')}</h3>
- <p>
- {translate('billing.upgrade_box.text')}
- </p>
+ <p>{translate('billing.upgrade_box.text')}</p>
- {hasMessage('billing.upgrade_box.button') &&
+ {hasMessage('billing.upgrade_box.button') && (
<div className="big-spacer-top">
<Link
className="button"
@@ -50,7 +46,8 @@ export default function UpgradeOrganizationBox(props /*: Props */) {
}}>
{translate('billing.upgrade_box.button')}
</Link>
- </div>}
+ </div>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx
index 4e3642d03b0..4412feec4d1 100644
--- a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx
+++ b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx
@@ -54,38 +54,32 @@ export default class VisibilitySelector extends React.PureComponent<Props> {
'is-checked': this.props.visibility === 'public'
})}
/>
- <span className="spacer-left">
- {translate('visibility.public')}
- </span>
+ <span className="spacer-left">{translate('visibility.public')}</span>
</a>
- {this.props.canTurnToPrivate
- ? <a
- className="link-base-color link-no-underline huge-spacer-left"
- id="visibility-private"
- href="#"
- onClick={this.handlePrivateClick}>
- <i
- className={classNames('icon-radio', {
- 'is-checked': this.props.visibility === 'private'
- })}
- />
- <span className="spacer-left">
- {translate('visibility.private')}
- </span>
- </a>
- : <span
- className="huge-spacer-left text-muted cursor-not-allowed"
- id="visibility-private">
- <i
- className={classNames('icon-radio', {
- 'is-checked': this.props.visibility === 'private'
- })}
- />
- <span className="spacer-left">
- {translate('visibility.private')}
- </span>
- </span>}
+ {this.props.canTurnToPrivate ? (
+ <a
+ className="link-base-color link-no-underline huge-spacer-left"
+ id="visibility-private"
+ href="#"
+ onClick={this.handlePrivateClick}>
+ <i
+ className={classNames('icon-radio', {
+ 'is-checked': this.props.visibility === 'private'
+ })}
+ />
+ <span className="spacer-left">{translate('visibility.private')}</span>
+ </a>
+ ) : (
+ <span className="huge-spacer-left text-muted cursor-not-allowed" id="visibility-private">
+ <i
+ className={classNames('icon-radio', {
+ 'is-checked': this.props.visibility === 'private'
+ })}
+ />
+ <span className="spacer-left">{translate('visibility.private')}</span>
+ </span>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.js b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.js
index 817f852d023..58afbecad26 100644
--- a/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.js
+++ b/server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.js
@@ -42,11 +42,11 @@ it('should render correctly with children', () => {
expect(
shallow(
<SelectList items={items} currentItem="seconditem" onSelect={onSelect}>
- {items.map(item =>
+ {items.map(item => (
<SelectListItem key={item} item={item}>
<i className="myicon" />item
</SelectListItem>
- )}
+ ))}
</SelectList>
)
).toMatchSnapshot();
@@ -57,11 +57,11 @@ it('should correclty handle user actions', () => {
const items = ['item', 'seconditem', 'third'];
const list = mount(
<SelectList items={items} currentItem="seconditem" onSelect={onSelect}>
- {items.map(item =>
+ {items.map(item => (
<SelectListItem key={item} item={item}>
<i className="myicon" />item
</SelectListItem>
- )}
+ ))}
</SelectList>
);
keydown(40);
diff --git a/server/sonar-web/src/main/js/components/common/action-options-view.js b/server/sonar-web/src/main/js/components/common/action-options-view.js
index a538e22b88e..a3ac45902ce 100644
--- a/server/sonar-web/src/main/js/components/common/action-options-view.js
+++ b/server/sonar-web/src/main/js/components/common/action-options-view.js
@@ -55,7 +55,9 @@ export default PopupView.extend({
makeActive(option) {
if (option.length > 0) {
- this.getOptions().removeClass('active').tooltip('hide');
+ this.getOptions()
+ .removeClass('active')
+ .tooltip('hide');
option.addClass('active').tooltip('show');
}
},
@@ -66,14 +68,22 @@ export default PopupView.extend({
selectNextOption() {
this.makeActive(
- this.getActiveOption().parent().nextAll('li:not(.divider)').first().children('a')
+ this.getActiveOption()
+ .parent()
+ .nextAll('li:not(.divider)')
+ .first()
+ .children('a')
);
return false;
},
selectPreviousOption() {
this.makeActive(
- this.getActiveOption().parent().prevAll('li:not(.divider)').first().children('a')
+ this.getActiveOption()
+ .parent()
+ .prevAll('li:not(.divider)')
+ .first()
+ .children('a')
);
return false;
},
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 2629ce5b077..0610c634f0a 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
@@ -38,7 +38,10 @@ export default ModalView.extend({
ModalView.prototype.onRender.apply(this, arguments);
const that = this;
setTimeout(() => {
- that.$(':tabbable').first().focus();
+ that
+ .$(':tabbable')
+ .first()
+ .focus();
}, 0);
},
diff --git a/server/sonar-web/src/main/js/components/controls/DateInput.tsx b/server/sonar-web/src/main/js/components/controls/DateInput.tsx
index 6a226b1b398..807625faa1c 100644
--- a/server/sonar-web/src/main/js/components/controls/DateInput.tsx
+++ b/server/sonar-web/src/main/js/components/controls/DateInput.tsx
@@ -88,10 +88,11 @@ export default class DateInput extends React.PureComponent<Props> {
<path d="M5.5 6h2v2h-2V6zm3 0h2v2h-2V6zm3 0h2v2h-2V6zm-9 6h2v2h-2v-2zm3 0h2v2h-2v-2zm3 0h2v2h-2v-2zm-3-3h2v2h-2V9zm3 0h2v2h-2V9zm3 0h2v2h-2V9zm-9 0h2v2h-2V9zm11-9v1h-2V0h-7v1h-2V0h-2v16h15V0h-2zm1 15h-13V4h13v11z" />
</svg>
</span>
- {this.props.value != undefined &&
+ {this.props.value != undefined && (
<a className="date-input-control-reset" href="#" onClick={this.handleResetClick}>
<CloseIcon className="" />
- </a>}
+ </a>
+ )}
</span>
);
}
diff --git a/server/sonar-web/src/main/js/components/controls/GlobalMessages.js b/server/sonar-web/src/main/js/components/controls/GlobalMessages.js
index ac3c07535bf..3053996688b 100644
--- a/server/sonar-web/src/main/js/components/controls/GlobalMessages.js
+++ b/server/sonar-web/src/main/js/components/controls/GlobalMessages.js
@@ -59,10 +59,6 @@ export default class GlobalMessages extends React.PureComponent {
return null;
}
- return (
- <div className="processes-container">
- {messages.map(this.renderMessage)}
- </div>
- );
+ return <div className="processes-container">{messages.map(this.renderMessage)}</div>;
}
}
diff --git a/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx b/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx
index fd27b3752dc..bfb7c4cfee1 100644
--- a/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx
+++ b/server/sonar-web/src/main/js/components/controls/RadioToggle.tsx
@@ -51,18 +51,12 @@ export default class RadioToggle extends React.PureComponent<Props> {
onChange={this.handleChange}
/>
- <label htmlFor={htmlId}>
- {option.label}
- </label>
+ <label htmlFor={htmlId}>{option.label}</label>
</li>
);
};
render() {
- return (
- <ul className="radio-toggle">
- {this.props.options.map(this.renderOption)}
- </ul>
- );
+ return <ul className="radio-toggle">{this.props.options.map(this.renderOption)}</ul>;
}
}
diff --git a/server/sonar-web/src/main/js/components/controls/SearchSelect.js b/server/sonar-web/src/main/js/components/controls/SearchSelect.js
index f8eaf43665b..84eb5253b9b 100644
--- a/server/sonar-web/src/main/js/components/controls/SearchSelect.js
+++ b/server/sonar-web/src/main/js/components/controls/SearchSelect.js
@@ -110,9 +110,11 @@ export default class SearchSelect extends React.PureComponent {
filterOption={this.handleFilterOption}
isLoading={this.state.loading}
noResultsText={
- this.state.query.length < this.props.minimumQueryLength
- ? translateWithParameters('select2.tooShort', this.props.minimumQueryLength)
- : translate('select2.noMatches')
+ this.state.query.length < this.props.minimumQueryLength ? (
+ translateWithParameters('select2.tooShort', this.props.minimumQueryLength)
+ ) : (
+ translate('select2.noMatches')
+ )
}
onBlur={this.props.resetOnBlur ? this.handleBlur : undefined}
onChange={this.handleChange}
diff --git a/server/sonar-web/src/main/js/components/controls/styles.css b/server/sonar-web/src/main/js/components/controls/styles.css
index d54cab0df84..0917ddd28ac 100644
--- a/server/sonar-web/src/main/js/components/controls/styles.css
+++ b/server/sonar-web/src/main/js/components/controls/styles.css
@@ -62,7 +62,7 @@
border-radius: 22px;
box-sizing: border-box;
background-color: #f6f6f6;
- transition: transform 0.3s cubic-bezier(.87, -.41, .19, 1.44), border 0.3s ease;
+ transition: transform 0.3s cubic-bezier(0.87, -0.41, 0.19, 1.44), border 0.3s ease;
}
.boolean-toggle-on {
diff --git a/server/sonar-web/src/main/js/components/facet/FacetBox.js b/server/sonar-web/src/main/js/components/facet/FacetBox.js
index bc77ac7b6f1..e77f27bb78d 100644
--- a/server/sonar-web/src/main/js/components/facet/FacetBox.js
+++ b/server/sonar-web/src/main/js/components/facet/FacetBox.js
@@ -27,9 +27,5 @@ type Props = {|
*/
export default function FacetBox(props /*: Props */) {
- return (
- <div className="search-navigator-facet-box">
- {props.children}
- </div>
- );
+ return <div className="search-navigator-facet-box">{props.children}</div>;
}
diff --git a/server/sonar-web/src/main/js/components/facet/FacetHeader.js b/server/sonar-web/src/main/js/components/facet/FacetHeader.js
index b80cec0f7a6..7950444a2e0 100644
--- a/server/sonar-web/src/main/js/components/facet/FacetHeader.js
+++ b/server/sonar-web/src/main/js/components/facet/FacetHeader.js
@@ -66,15 +66,17 @@ export default class FacetHeader extends React.PureComponent {
width="10"
height="10"
style={{ paddingTop: 3 }}>
- {this.props.open
- ? <path
- style={{ fill: 'currentColor ' }}
- d="M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"
- />
- : <path
- style={{ fill: 'currentColor ' }}
- d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"
- />}
+ {this.props.open ? (
+ <path
+ style={{ fill: 'currentColor ' }}
+ d="M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"
+ />
+ ) : (
+ <path
+ style={{ fill: 'currentColor ' }}
+ d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"
+ />
+ )}
</svg>
);
}
@@ -97,9 +99,7 @@ export default class FacetHeader extends React.PureComponent {
return null;
}
return (
- <span className="spacer-left badge badge-secondary is-rounded">
- {this.props.values}
- </span>
+ <span className="spacer-left badge badge-secondary is-rounded">{this.props.values}</span>
);
}
@@ -108,26 +108,29 @@ export default class FacetHeader extends React.PureComponent {
return (
<div>
- {showClearButton &&
+ {showClearButton && (
<button
className="search-navigator-facet-header-button button-small button-red"
onClick={this.handleClearClick}>
{translate('clear')}
- </button>}
+ </button>
+ )}
- {this.props.onClick
- ? <span className="search-navigator-facet-header">
- <a href="#" onClick={this.handleClick}>
- {this.renderCheckbox()}
- {this.props.name}
- </a>
- {this.renderHelper()}
- {this.renderValueIndicator()}
- </span>
- : <span className="search-navigator-facet-header">
+ {this.props.onClick ? (
+ <span className="search-navigator-facet-header">
+ <a href="#" onClick={this.handleClick}>
+ {this.renderCheckbox()}
{this.props.name}
- {this.renderHelper()}
- </span>}
+ </a>
+ {this.renderHelper()}
+ {this.renderValueIndicator()}
+ </span>
+ ) : (
+ <span className="search-navigator-facet-header">
+ {this.props.name}
+ {this.renderHelper()}
+ </span>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/facet/FacetItem.js b/server/sonar-web/src/main/js/components/facet/FacetItem.js
index 0c238732209..3237bf66a5d 100644
--- a/server/sonar-web/src/main/js/components/facet/FacetItem.js
+++ b/server/sonar-web/src/main/js/components/facet/FacetItem.js
@@ -52,24 +52,16 @@ export default class FacetItem extends React.PureComponent {
'search-navigator-facet-half': this.props.halfWidth
});
- return this.props.disabled
- ? <span className={className}>
- <span className="facet-name">
- {this.props.name}
- </span>
- {this.props.stat != null &&
- <span className="facet-stat">
- {this.props.stat}
- </span>}
- </span>
- : <a className={className} href="#" onClick={this.handleClick}>
- <span className="facet-name">
- {this.props.name}
- </span>
- {this.props.stat != null &&
- <span className="facet-stat">
- {this.props.stat}
- </span>}
- </a>;
+ return this.props.disabled ? (
+ <span className={className}>
+ <span className="facet-name">{this.props.name}</span>
+ {this.props.stat != null && <span className="facet-stat">{this.props.stat}</span>}
+ </span>
+ ) : (
+ <a className={className} href="#" onClick={this.handleClick}>
+ <span className="facet-name">{this.props.name}</span>
+ {this.props.stat != null && <span className="facet-stat">{this.props.stat}</span>}
+ </a>
+ );
}
}
diff --git a/server/sonar-web/src/main/js/components/facet/FacetItemsList.js b/server/sonar-web/src/main/js/components/facet/FacetItemsList.js
index 8267eaa6582..ca431b594e1 100644
--- a/server/sonar-web/src/main/js/components/facet/FacetItemsList.js
+++ b/server/sonar-web/src/main/js/components/facet/FacetItemsList.js
@@ -27,9 +27,5 @@ type Props = {|
*/
export default function FacetItemsList(props /*: Props */) {
- return (
- <div className="search-navigator-facet-list">
- {props.children}
- </div>
- );
+ return <div className="search-navigator-facet-list">{props.children}</div>;
}
diff --git a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx
index a1b1a363b3d..62c4bf0d741 100644
--- a/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx
+++ b/server/sonar-web/src/main/js/components/icons-components/BranchIcon.tsx
@@ -32,7 +32,9 @@ interface Props {
}
export default function BranchIcon({ branch, ...props }: Props) {
- return isShortLivingBranch(branch)
- ? <ShortLivingBranchIcon {...props} />
- : <LongLivingBranchIcon {...props} />;
+ return isShortLivingBranch(branch) ? (
+ <ShortLivingBranchIcon {...props} />
+ ) : (
+ <LongLivingBranchIcon {...props} />
+ );
}
diff --git a/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js b/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js
index be71c1f128a..d11732bcb90 100644
--- a/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js
+++ b/server/sonar-web/src/main/js/components/icons-components/QualifierIcon.js
@@ -23,57 +23,66 @@ import React from 'react';
const DEFAULT_COLOR = '#2D88C0';
const ICONS /*: Object */ = {
- dir: (color = '#F90') =>
+ dir: (color = '#F90') => (
<path
fill={color}
strokeLinejoin="round"
d="M14 12.286V5.703c0-.198-.058-.36-.195-.5S13.512 5 13.315 5H6.704c-.196 0-.36-.075-.5-.214-.136-.14-.203-.312-.203-.51v-.57c0-.2-.07-.363-.207-.502C5.655 3.064 5.487 3 5.29 3H2.707c-.196 0-.363.065-.5.204-.137.14-.206.302-.206.5v8.582c0 .2.07.367.206.506.137.14.304.208.5.208h10.61c.196 0 .352-.07.49-.208.137-.14.194-.307.194-.506zm1-6.598v6.65c0 .458-.152.83-.475 1.16-.324.326-.7.502-1.15.502H2.647c-.452 0-.84-.175-1.162-.503-.324-.328-.486-.7-.486-1.158V3.654c0-.457.162-.842.486-1.17C1.81 2.158 2.196 2 2.648 2h2.7c.45 0 .84.157 1.164.485.324.328.488.714.488 1.17V4h6.373c.452 0 .83.174 1.152.5.323.33.475.73.475 1.187z"
- />,
- trk: (color = DEFAULT_COLOR) =>
+ />
+ ),
+ trk: (color = DEFAULT_COLOR) => (
<path
fill={color}
strokeLinejoin="round"
d="M14.985 13.988L1 14.005 1.02 5h13.966v8.988zM1.998 5.995l.006 7.02L14.022 13 14 6.004l-12.002-.01zM3 4.5V4h9.996l.004.5h1l-.005-1.497-11.98.003L2 4.5zm1-2v-.504h8.002L12 2.5h1l-.004-1.495H3.003L3 2.5z"
- />,
- brc: (color = DEFAULT_COLOR) =>
+ />
+ ),
+ brc: (color = DEFAULT_COLOR) => (
<g fill={color}>
<path d="M16 16H6v-6h10v6zm-9-1h8v-4H7v4zM7 9h8v1H7zM8 8h6v1H8z" />
<path d="M5 12H1V5h12v2h1V4H0v9h5zM3 1h8v.5h1V0H2v1.5h1zM2 3h10v.5h1V2H1v1.5h1z" />
- </g>,
- uts: (color = DEFAULT_COLOR) =>
+ </g>
+ ),
+ uts: (color = DEFAULT_COLOR) => (
<g fill={color}>
<path d="M3 14h10V6H9V2H3zm7.012-9h3.008c-.012-.674-.78-1.258-1.27-1.752-.488-.495-.973-1.243-1.75-1.24v2.96zM14 4.995V15H2V1l7.997.02c1.013-.03 1.57.893 2.239 1.555.667.663 1.75 1.47 1.763 2.42z" />
<path d="M7 8l-3 2.5L7 13zM8 13l3-2.5L8 8z" />
- </g>,
- fil: (color = DEFAULT_COLOR) =>
+ </g>
+ ),
+ fil: (color = DEFAULT_COLOR) => (
<g fill={color}>
<path d="M3 14h10v-8h-4v-4h-6zM10.012 5h3.008c-0.012-0.674-0.78-1.258-1.27-1.752-0.488-0.495-0.973-1.243-1.75-1.24v2.96zM14 4.995v10.005h-12v-14l7.997 0.020c1.013-0.030 1.57 0.893 2.239 1.555 0.667 0.663 1.75 1.47 1.763 2.42z" />
<path d="M4 11h8v1h-8zM4 9h8v1h-8z" />
- </g>,
- lib: (color = DEFAULT_COLOR) =>
+ </g>
+ ),
+ lib: (color = DEFAULT_COLOR) => (
<path
fill={color}
strokeLinejoin="round"
d="M1 13h4V3H1zm3-1H2v-2h2v2zM2 4h2v4H2zM6 13h4V3H6zm3-1H7v-2h2v2zM7 4h2v4H7zM11 13h4V3h-4zm3-1h-2v-2h2v2zm-2-8h2v4h-2z"
- />,
- vw: (color = DEFAULT_COLOR) =>
+ />
+ ),
+ vw: (color = DEFAULT_COLOR) => (
<g fill={color} fillRule="evenodd" strokeLinejoin="round">
<path d="M1.016 14.97V1.015H14.97V14.97H1.015zm1-1H13.97V2.015H2.015V13.97z" />
<path d="M3.006 7V3.006H7V7H3.006zm1-1H6V4.006H4.006V6zM9 7V3.015h3.985V7H9zm1-1h1.985V4.015H10V6zM3.004 12.996V9H7v3.996H3.004zm1-1H6V10H4.004v1.996zM9 12.997V9h3.997v3.997H9zm1-1h1.997V10H10v1.997z" />
- </g>,
- svw: (color = DEFAULT_COLOR) =>
+ </g>
+ ),
+ svw: (color = DEFAULT_COLOR) => (
<g fill={color}>
<path d="M13 7.2V1H1v12h7v1H0V0h14v7.2" />
<path d="M2 6V2h4v4H2zm1-1h2V3H3v2zm5 1V2h4v4H8zm1-1h2V3H9v2zm-7 7V8h4v4H2zm1-1h2V9H3v2zM16 16H7V7h9v9zm-8-1h7V8H8v7z" />
<path d="M9 9h2v2H9zM12 9h2v2h-2zM9 12h2v2H9zM12 12h2v2h-2z" />
- </g>,
- dev: (color = DEFAULT_COLOR) =>
+ </g>
+ ),
+ dev: (color = DEFAULT_COLOR) => (
<path
fill={color}
strokeLinejoin="round"
d="M7.974 8.02c-.938 0-1.82-.36-2.482-1.017-.663-.655-1.028-1.527-1.028-2.455 0-.927.365-1.8 1.028-2.455.663-.656 1.544-1.017 2.482-1.017.937 0 1.82.36 2.482 1.017.662.656 1.027 1.528 1.027 2.455 0 .928-.365 1.8-1.027 2.455C9.793 7.66 8.91 8.02 7.974 8.02zm0-5.778c-1.286 0-2.332 1.034-2.332 2.306s1.046 2.307 2.332 2.307c1.285 0 2.332-1.035 2.332-2.307S9.258 2.242 7.974 2.242zm3.534 6.418c.127.016.243.045.348.086.17.066.302.146.406.246.132.124.253.282.36.47.126.218.226.442.3.668.08.253.15.535.206.838.056.313.095.604.113.867.02.28.03.57.03.862 0 .532-.174.758-.306.882-.142.132-.397.31-.973.31H3.948c-.233 0-.437-.03-.606-.09-.14-.05-.26-.123-.366-.222-.13-.123-.306-.35-.306-.88 0-.294.01-.584.03-.863.018-.263.056-.554.112-.867.055-.303.125-.585.207-.838.073-.226.173-.45.298-.667.108-.19.23-.347.36-.47.106-.1.238-.18.407-.247.105-.04.22-.07.348-.086.202.13.432.277.683.435.342.217.756.4 1.265.564.523.166 1.06.25 1.59.25.534 0 1.07-.084 1.592-.25.51-.164.923-.348 1.266-.565.25-.158.48-.304.682-.435zm-.244-1.18c-.055 0-.184.066-.387.196-.202.13-.43.276-.685.437-.255.16-.586.307-.994.437-.408.13-.818.196-1.23.196-.41 0-.82-.065-1.228-.196-.408-.13-.74-.276-.993-.437-.255-.16-.484-.306-.686-.437-.202-.13-.33-.196-.386-.196-.374 0-.716.06-1.026.183-.31.12-.572.283-.787.487-.213.203-.404.45-.57.737-.165.288-.297.584-.395.888-.098.303-.18.633-.244.988-.063.355-.106.685-.128.992-.02.306-.032.62-.032.942 0 .73.224 1.304.672 1.726.448.42 1.043.632 1.785.632h8.044c.743 0 1.34-.21 1.787-.633.447-.42.67-.996.67-1.725 0-.32-.01-.635-.03-.942-.022-.307-.065-.637-.13-.992-.064-.355-.146-.685-.244-.988-.098-.304-.23-.6-.395-.888-.166-.288-.356-.534-.57-.737-.216-.204-.478-.366-.788-.487-.31-.122-.652-.183-1.026-.183z"
- />,
- app: (color = '#4A9ED5') =>
+ />
+ ),
+ app: (color = '#4A9ED5') => (
<g fill="none" stroke={color} strokeMiterlimit={10}>
<circle cx="3" cy="3" r="1.5" />
<circle cx="8" cy="3" r="1.5" />
@@ -85,6 +94,7 @@ const ICONS /*: Object */ = {
<circle cx="8" cy="13" r="1.5" />
<circle cx="13" cy="13" r="1.5" />
</g>
+ )
};
ICONS.pac = ICONS.dir;
diff --git a/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx b/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx
index 8f9aaa32191..1943512ff8c 100644
--- a/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx
+++ b/server/sonar-web/src/main/js/components/intl/DateTooltipFormatter.tsx
@@ -33,7 +33,7 @@ export default function DateTooltipFormatter({ className, date, placement }: Pro
const parsedDate = parseDate(date);
return (
<DateFormatter date={parsedDate} long={true}>
- {formattedDate =>
+ {formattedDate => (
<Tooltip
overlay={<DateTimeFormatter date={parsedDate} />}
placement={placement}
@@ -41,7 +41,8 @@ export default function DateTooltipFormatter({ className, date, placement }: Pro
<time className={className} dateTime={parsedDate.toISOString()}>
{formattedDate}
</time>
- </Tooltip>}
+ </Tooltip>
+ )}
</DateFormatter>
);
}
diff --git a/server/sonar-web/src/main/js/components/intl/TimeTooltipFormatter.tsx b/server/sonar-web/src/main/js/components/intl/TimeTooltipFormatter.tsx
index 857ed31e2f9..082074da474 100644
--- a/server/sonar-web/src/main/js/components/intl/TimeTooltipFormatter.tsx
+++ b/server/sonar-web/src/main/js/components/intl/TimeTooltipFormatter.tsx
@@ -32,7 +32,7 @@ export default function TimeTooltipFormatter({ className, date, placement }: Pro
const parsedDate = parseDate(date);
return (
<TimeFormatter date={parsedDate} long={false}>
- {formattedTime =>
+ {formattedTime => (
<Tooltip
overlay={<TimeFormatter date={parsedDate} long={true} />}
placement={placement}
@@ -40,7 +40,8 @@ export default function TimeTooltipFormatter({ className, date, placement }: Pro
<time className={className} dateTime={parsedDate.toISOString()}>
{formattedTime}
</time>
- </Tooltip>}
+ </Tooltip>
+ )}
</TimeFormatter>
);
}
diff --git a/server/sonar-web/src/main/js/components/issue/IssueView.js b/server/sonar-web/src/main/js/components/issue/IssueView.js
index 5800390c44c..49de5e25b6c 100644
--- a/server/sonar-web/src/main/js/components/issue/IssueView.js
+++ b/server/sonar-web/src/main/js/components/issue/IssueView.js
@@ -102,29 +102,31 @@ export default class IssueView extends React.PureComponent {
onChange={this.props.onChange}
/>
{issue.comments &&
- issue.comments.length > 0 &&
+ issue.comments.length > 0 && (
<div className="issue-comments">
- {issue.comments.map(comment =>
+ {issue.comments.map(comment => (
<IssueCommentLine
comment={comment}
key={comment.key}
onEdit={this.editComment}
onDelete={this.deleteComment}
/>
- )}
- </div>}
+ ))}
+ </div>
+ )}
<a className="issue-navigate js-issue-navigate">
<i className="issue-navigate-to-left icon-chevron-left" />
<i className="issue-navigate-to-right icon-chevron-right" />
</a>
- {hasCheckbox &&
+ {hasCheckbox && (
<a className="js-toggle issue-checkbox-container" href="#" onClick={this.handleCheck}>
<i
className={classNames('issue-checkbox', 'icon-checkbox', {
'icon-checkbox-checked': this.props.checked
})}
/>
- </a>}
+ </a>
+ )}
</div>
);
}
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.js b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.js
index 03837602471..f36ac5d3504 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.js
@@ -136,13 +136,14 @@ export default class IssueActionsBar extends React.PureComponent {
togglePopup={this.props.togglePopup}
/>
</li>
- {issue.effort &&
+ {issue.effort && (
<li className="issue-meta">
<span className="issue-meta-label">
{translateWithParameters('issue.x_effort', issue.effort)}
</span>
- </li>}
- {canComment &&
+ </li>
+ )}
+ {canComment && (
<IssueCommentAction
commentPlaceholder={this.state.commentPlaceholder}
currentPopup={this.props.currentPopup}
@@ -150,7 +151,8 @@ export default class IssueActionsBar extends React.PureComponent {
onChange={this.props.onChange}
onFail={this.props.onFail}
toggleComment={this.toggleComment}
- />}
+ />
+ )}
</ul>
</td>
<td className="issue-table-meta-cell">
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.js b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.js
index 249c9ae969d..ba6e67dda76 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.js
@@ -47,7 +47,7 @@ export default class IssueAssign extends React.PureComponent {
const { issue } = this.props;
return (
<span>
- {issue.assignee &&
+ {issue.assignee && (
<span className="text-top">
<Avatar
className="little-spacer-right"
@@ -55,7 +55,8 @@ export default class IssueAssign extends React.PureComponent {
name={issue.assigneeName}
size={16}
/>
- </span>}
+ </span>
+ )}
<span className="issue-meta-label">
{issue.assignee ? issue.assigneeName : translate('unassigned')}
</span>
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.js b/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.js
index 4c11eb707e6..e0b1a93556b 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.js
@@ -69,9 +69,5 @@ export default function IssueChangelogDiff(props /*: { diff: ChangelogDiff } */)
}
message += ` (${translateWithParameters('issue.changelog.was', oldValue)})`;
}
- return (
- <p>
- {message}
- </p>
- );
+ return <p>{message}</p>;
}
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.js b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.js
index b756e185da9..c427818c403 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentAction.js
@@ -69,9 +69,7 @@ export default class IssueCommentAction extends React.PureComponent {
<button
className="button-link issue-action js-issue-comment"
onClick={this.handleCommentClick}>
- <span className="issue-meta-label">
- {translate('issue.comment.formlink')}
- </span>
+ <span className="issue-meta-label">{translate('issue.comment.formlink')}</span>
</button>
</BubblePopupHelper>
</li>
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.js b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.js
index aa6eeb9013f..f6c73044282 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueCommentLine.js
@@ -101,7 +101,7 @@ export default class IssueCommentLine extends React.PureComponent {
<DateFromNow date={comment.createdAt} />
</div>
<div className="issue-comment-actions">
- {comment.updatable &&
+ {comment.updatable && (
<BubblePopupHelper
className="bubble-popup-helper-inline"
isOpen={this.state.openPopup === 'edit'}
@@ -121,8 +121,9 @@ export default class IssueCommentLine extends React.PureComponent {
className="js-issue-comment-edit button-link icon-edit icon-half-transparent"
onClick={this.toggleEditPopup}
/>
- </BubblePopupHelper>}
- {comment.updatable &&
+ </BubblePopupHelper>
+ )}
+ {comment.updatable && (
<BubblePopupHelper
className="bubble-popup-helper-inline"
isOpen={this.state.openPopup === 'delete'}
@@ -134,7 +135,8 @@ export default class IssueCommentLine extends React.PureComponent {
className="js-issue-comment-delete button-link icon-delete icon-half-transparent"
onClick={this.toggleDeletePopup}
/>
- </BubblePopupHelper>}
+ </BubblePopupHelper>
+ )}
</div>
</div>
);
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js
index 82aa5852ef4..97bf195fdac 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js
+++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js
@@ -58,9 +58,7 @@ export default function IssueTitleBar(props /*: Props */) {
formatMeasure(locationsCount)
)}
placement="left">
- <LocationIndex>
- {locationsCount}
- </LocationIndex>
+ <LocationIndex>{locationsCount}</LocationIndex>
</Tooltip>
);
@@ -91,20 +89,24 @@ export default function IssueTitleBar(props /*: Props */) {
onFail={props.onFail}
/>
</li>
- {issue.textRange != null &&
+ {issue.textRange != null && (
<li className="issue-meta">
<span className="issue-meta-label" title={translate('line_number')}>
L{issue.textRange.endLine}
</span>
- </li>}
- {locationsCount > 0 &&
+ </li>
+ )}
+ {locationsCount > 0 && (
<li className="issue-meta">
- {onIssuesPage
- ? locationsBadge
- : <Link onClick={stopPropagation} target="_blank" to={issueUrl}>
- {locationsBadge}
- </Link>}
- </li>}
+ {onIssuesPage ? (
+ locationsBadge
+ ) : (
+ <Link onClick={stopPropagation} target="_blank" to={issueUrl}>
+ {locationsBadge}
+ </Link>
+ )}
+ </li>
+ )}
<li className="issue-meta">
<Link
className="js-issue-permalink link-no-underline"
@@ -114,7 +116,7 @@ export default function IssueTitleBar(props /*: Props */) {
<LinkIcon />
</Link>
</li>
- {hasSimilarIssuesFilter &&
+ {hasSimilarIssuesFilter && (
<li className="issue-meta">
<SimilarIssuesFilter
isOpen={props.currentPopup === 'similarIssues'}
@@ -123,7 +125,8 @@ export default function IssueTitleBar(props /*: Props */) {
onFail={props.onFail}
onFilter={props.onFilter}
/>
- </li>}
+ </li>
+ )}
</ul>
</td>
</tr>
diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.js b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.js
index 007163c6666..02e2bce9e13 100644
--- a/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.js
+++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/IssueTitleBar-test.js
@@ -66,5 +66,10 @@ it('should count all code locations', () => {
secondaryLocations: [{}, {}]
};
const element = shallow(<IssueTitleBar issue={issueWithLocations} />);
- expect(element.find('LocationIndex').children().text()).toBe('7');
+ expect(
+ element
+ .find('LocationIndex')
+ .children()
+ .text()
+ ).toBe('7');
});
diff --git a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.js b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.js
index 01549d5dac7..ac9bfa546bb 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.js
@@ -93,13 +93,13 @@ export default class ChangelogPopup extends React.PureComponent {
</td>
</tr>
- {this.state.changelogs.map((item, idx) =>
+ {this.state.changelogs.map((item, idx) => (
<tr key={idx}>
<td className="thin text-left text-top nowrap">
<DateTimeFormatter date={item.creationDate} />
</td>
<td className="text-left text-top">
- {item.userName &&
+ {item.userName && (
<p>
<Avatar
className="little-spacer-right"
@@ -108,11 +108,12 @@ export default class ChangelogPopup extends React.PureComponent {
size={16}
/>
{item.userName}
- </p>}
+ </p>
+ )}
{item.diffs.map(diff => <IssueChangelogDiff key={diff.key} diff={diff} />)}
</td>
</tr>
- )}
+ ))}
</tbody>
</table>
</div>
diff --git a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.js b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.js
index 428efc6a6b9..aed14996166 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/CommentDeletePopup.js
@@ -33,9 +33,7 @@ export default function CommentDeletePopup(props /*: Props */) {
return (
<BubblePopup position={props.popupPosition} customClass="bubble-popup-bottom-right">
<div className="text-right">
- <div className="spacer-bottom">
- {translate('issue.comment.delete_confirm_message')}
- </div>
+ <div className="spacer-bottom">{translate('issue.comment.delete_confirm_message')}</div>
<button className="button-red" onClick={props.onDelete}>
{translate('delete')}
</button>
diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js
index 074f3345ba5..9c6b6187c65 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.js
@@ -145,23 +145,24 @@ export default class SetAssigneePopup extends React.PureComponent {
items={map(this.state.users, 'login')}
currentItem={this.state.currentUser}
onSelect={this.props.onSelect}>
- {this.state.users.map(user =>
+ {this.state.users.map(user => (
<SelectListItem key={user.login} item={user.login}>
- {!!user.login &&
+ {!!user.login && (
<Avatar
className="spacer-right"
email={user.email}
hash={user.avatar}
name={user.name}
size={16}
- />}
+ />
+ )}
<span
className="vertical-middle"
style={{ marginLeft: !user.login ? 24 : undefined }}>
{user.name}
</span>
</SelectListItem>
- )}
+ ))}
</SelectList>
</div>
</BubblePopup>
diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.js b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.js
index 033ea8e72a8..35c98b4a389 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/SetSeverityPopup.js
@@ -48,12 +48,12 @@ export default class SetSeverityPopup extends React.PureComponent {
items={SEVERITY}
currentItem={this.props.issue.severity}
onSelect={this.props.onSelect}>
- {SEVERITY.map(severity =>
+ {SEVERITY.map(severity => (
<SelectListItem key={severity} item={severity}>
<SeverityIcon className="little-spacer-right" severity={severity} />
{translate('severity', severity)}
</SelectListItem>
- )}
+ ))}
</SelectList>
</BubblePopup>
);
diff --git a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.js b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.js
index e3c4d466f28..9085235dea4 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/SetTypePopup.js
@@ -48,12 +48,12 @@ export default class SetTypePopup extends React.PureComponent {
items={TYPES}
currentItem={this.props.issue.type}
onSelect={this.props.onSelect}>
- {TYPES.map(type =>
+ {TYPES.map(type => (
<SelectListItem key={type} item={type}>
<IssueTypeIcon className="little-spacer-right" query={type} />
{translate('issue.type', type)}
</SelectListItem>
- )}
+ ))}
</SelectList>
</BubblePopup>
);
diff --git a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.js b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.js
index 4a2642f01ac..ca556766fc9 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.js
+++ b/server/sonar-web/src/main/js/components/issue/popups/SimilarIssuesPopup.js
@@ -68,9 +68,7 @@ export default class SimilarIssuesPopup extends React.PureComponent {
position={this.props.popupPosition}
customClass="bubble-popup-menu bubble-popup-bottom-right">
<header className="menu-search">
- <h6>
- {translate('issue.filter_similar_issues')}
- </h6>
+ <h6>{translate('issue.filter_similar_issues')}</h6>
</header>
<SelectList currentItem={items[0]} items={items} onSelect={this.handleSelect}>
@@ -88,48 +86,51 @@ export default class SimilarIssuesPopup extends React.PureComponent {
</SelectListItem>
<SelectListItem item="resolution">
- {issue.resolution != null
- ? translate('issue.resolution', issue.resolution)
- : translate('unresolved')}
+ {issue.resolution != null ? (
+ translate('issue.resolution', issue.resolution)
+ ) : (
+ translate('unresolved')
+ )}
</SelectListItem>
<SelectListItem item="assignee">
- {issue.assignee != null
- ? <span>
- {translate('assigned_to')}
- <Avatar
- className="little-spacer-left little-spacer-right"
- hash={issue.assigneeAvatar}
- name={issue.assigneeName}
- size={16}
- />
- {issue.assigneeName}
- </span>
- : translate('unassigned')}
+ {issue.assignee != null ? (
+ <span>
+ {translate('assigned_to')}
+ <Avatar
+ className="little-spacer-left little-spacer-right"
+ hash={issue.assigneeAvatar}
+ name={issue.assigneeName}
+ size={16}
+ />
+ {issue.assigneeName}
+ </span>
+ ) : (
+ translate('unassigned')
+ )}
</SelectListItem>
- <SelectListItem item="rule">
- {limitComponentName(issue.ruleName)}
- </SelectListItem>
+ <SelectListItem item="rule">{limitComponentName(issue.ruleName)}</SelectListItem>
{issue.tags != null &&
- issue.tags.map(tag =>
+ issue.tags.map(tag => (
<SelectListItem key={`tag###${tag}`} item={`tag###${tag}`}>
<i className="icon-tags icon-half-transparent little-spacer-right" />
{tag}
</SelectListItem>
- )}
+ ))}
<SelectListItem item="project">
<QualifierIcon className="little-spacer-right" qualifier="TRK" />
{issue.projectName}
</SelectListItem>
- {issue.subProject != null &&
+ {issue.subProject != null && (
<SelectListItem item="module">
<QualifierIcon className="little-spacer-right" qualifier="BRC" />
{issue.subProjectName}
- </SelectListItem>}
+ </SelectListItem>
+ )}
<SelectListItem item="file">
<QualifierIcon className="little-spacer-right" qualifier={issue.componentQualifier} />
diff --git a/server/sonar-web/src/main/js/components/measure/Measure.js b/server/sonar-web/src/main/js/components/measure/Measure.js
index 513d54e5699..c95d52f8280 100644
--- a/server/sonar-web/src/main/js/components/measure/Measure.js
+++ b/server/sonar-web/src/main/js/components/measure/Measure.js
@@ -43,11 +43,7 @@ export default function Measure({ className, decimals, measure } /*: Props */) {
const formattedValue = isDiffMetric(metric.key)
? formatLeak(measure.leak, metric, { decimals })
: formatMeasure(measure.value, metric.type, { decimals });
- return (
- <span className={className}>
- {formattedValue != null ? formattedValue : '–'}
- </span>
- );
+ return <span className={className}>{formattedValue != null ? formattedValue : '–'}</span>;
}
const value = isDiffMetric(metric.key) ? measure.leak : measure.value;
@@ -56,9 +52,7 @@ export default function Measure({ className, decimals, measure } /*: Props */) {
if (tooltip) {
return (
<Tooltips overlay={tooltip}>
- <span className={className}>
- {rating}
- </span>
+ <span className={className}>{rating}</span>
</Tooltips>
);
}
diff --git a/server/sonar-web/src/main/js/components/nav/NavBar.css b/server/sonar-web/src/main/js/components/nav/NavBar.css
index df1c0738245..e37b1188948 100644
--- a/server/sonar-web/src/main/js/components/nav/NavBar.css
+++ b/server/sonar-web/src/main/js/components/nav/NavBar.css
@@ -1,6 +1,6 @@
.navbar,
-[class^="navbar-"],
-[class*=" navbar-"] {
+[class^='navbar-'],
+[class*=' navbar-'] {
box-sizing: border-box;
}
diff --git a/server/sonar-web/src/main/js/components/nav/NavBar.tsx b/server/sonar-web/src/main/js/components/nav/NavBar.tsx
index 08d0e18b511..bc760ba35a0 100644
--- a/server/sonar-web/src/main/js/components/nav/NavBar.tsx
+++ b/server/sonar-web/src/main/js/components/nav/NavBar.tsx
@@ -31,9 +31,7 @@ export default function NavBar({ children, className, height, ...other }: Props)
return (
<nav {...other} className={classNames('navbar', className)} style={{ height }}>
<div className="navbar-inner" style={{ height }}>
- <div className="navbar-limited clearfix">
- {children}
- </div>
+ <div className="navbar-limited clearfix">{children}</div>
</div>
</nav>
);
diff --git a/server/sonar-web/src/main/js/components/select-list/list.js b/server/sonar-web/src/main/js/components/select-list/list.js
index c752367bb8e..0651189fedd 100644
--- a/server/sonar-web/src/main/js/components/select-list/list.js
+++ b/server/sonar-web/src/main/js/components/select-list/list.js
@@ -35,10 +35,6 @@ export default class List extends React.PureComponent {
const key = this.props.getItemKey(item);
return <Item key={key} {...this.props} item={item} />;
});
- return (
- <ul>
- {renderedItems}
- </ul>
- );
+ return <ul>{renderedItems}</ul>;
}
}
diff --git a/server/sonar-web/src/main/js/components/shared/Organization.js b/server/sonar-web/src/main/js/components/shared/Organization.js
index 3debbb2a878..1c3d5abf574 100644
--- a/server/sonar-web/src/main/js/components/shared/Organization.js
+++ b/server/sonar-web/src/main/js/components/shared/Organization.js
@@ -55,11 +55,13 @@ class Organization extends React.PureComponent {
return (
<span>
- {this.props.link
- ? <OrganizationLink className={this.props.linkClassName} organization={organization}>
- {organization.name}
- </OrganizationLink>
- : organization.name}
+ {this.props.link ? (
+ <OrganizationLink className={this.props.linkClassName} organization={organization}>
+ {organization.name}
+ </OrganizationLink>
+ ) : (
+ organization.name
+ )}
<span className="slash-separator" />
</span>
);
diff --git a/server/sonar-web/src/main/js/components/shared/TypeHelper.js b/server/sonar-web/src/main/js/components/shared/TypeHelper.js
index e734f22a8d5..9f423a5f489 100644
--- a/server/sonar-web/src/main/js/components/shared/TypeHelper.js
+++ b/server/sonar-web/src/main/js/components/shared/TypeHelper.js
@@ -28,10 +28,11 @@ type Props = {
};
*/
-const TypeHelper = (props /*: Props */) =>
+const TypeHelper = (props /*: Props */) => (
<span>
<IssueTypeIcon className="little-spacer-right" query={props.type} />
{translate('issue.type', props.type)}
- </span>;
+ </span>
+);
export default TypeHelper;
diff --git a/server/sonar-web/src/main/js/components/tags/TagsList.js b/server/sonar-web/src/main/js/components/tags/TagsList.js
index 36cd65af6d4..c85ad16c00a 100644
--- a/server/sonar-web/src/main/js/components/tags/TagsList.js
+++ b/server/sonar-web/src/main/js/components/tags/TagsList.js
@@ -45,9 +45,7 @@ export default class TagsList extends React.PureComponent {
return (
<span className={tagListClass} title={tags.join(', ')}>
<i className="icon-tags icon-half-transparent" />
- <span className={spanClass}>
- {tags.join(', ')}
- </span>
+ <span className={spanClass}>{tags.join(', ')}</span>
{allowUpdate && <i className="icon-dropdown" />}
</span>
);
diff --git a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
index 77d99af4129..0cb22a681ce 100644
--- a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
+++ b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
@@ -40,7 +40,7 @@
.duplications-rating:after {
border-radius: 24px;
- content: "";
+ content: '';
}
.duplications-rating-A {
diff --git a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx
index 63aae3cc815..1d54a61692a 100644
--- a/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx
+++ b/server/sonar-web/src/main/js/components/ui/IssueTypeIcon.tsx
@@ -52,9 +52,5 @@ export default function IssueTypeIcon(props: Props) {
return null;
}
- return props.className
- ? <span className={props.className}>
- {icon}
- </span>
- : icon;
+ return props.className ? <span className={props.className}>{icon}</span> : icon;
}
diff --git a/server/sonar-web/src/main/js/components/ui/Level.tsx b/server/sonar-web/src/main/js/components/ui/Level.tsx
index b5495695578..e18d1b9f0f5 100644
--- a/server/sonar-web/src/main/js/components/ui/Level.tsx
+++ b/server/sonar-web/src/main/js/components/ui/Level.tsx
@@ -35,9 +35,5 @@ export default function Level(props: Props) {
'level-small': props.small,
'level-muted': props.muted
});
- return (
- <span className={className}>
- {formatted}
- </span>
- );
+ return <span className={className}>{formatted}</span>;
}
diff --git a/server/sonar-web/src/main/js/components/ui/Rating.js b/server/sonar-web/src/main/js/components/ui/Rating.js
index 1f30a388d04..0ec18df9e7c 100644
--- a/server/sonar-web/src/main/js/components/ui/Rating.js
+++ b/server/sonar-web/src/main/js/components/ui/Rating.js
@@ -53,10 +53,6 @@ export default class Rating extends React.PureComponent {
},
this.props.className
);
- return (
- <span className={className}>
- {formatted}
- </span>
- );
+ return <span className={className}>{formatted}</span>;
}
}
diff --git a/server/sonar-web/src/main/js/components/ui/SizeRating.js b/server/sonar-web/src/main/js/components/ui/SizeRating.js
index c4fd00c2bb6..3518c901225 100644
--- a/server/sonar-web/src/main/js/components/ui/SizeRating.js
+++ b/server/sonar-web/src/main/js/components/ui/SizeRating.js
@@ -61,10 +61,6 @@ export default class SizeRating extends React.PureComponent {
'size-rating-muted': this.props.muted
});
- return (
- <div className={className}>
- {letter}
- </div>
- );
+ return <div className={className}>{letter}</div>;
}
}
diff --git a/server/sonar-web/src/main/js/components/widgets/barchart.js b/server/sonar-web/src/main/js/components/widgets/barchart.js
index dadb5788eac..ab376ca1a3d 100644
--- a/server/sonar-web/src/main/js/components/widgets/barchart.js
+++ b/server/sonar-web/src/main/js/components/widgets/barchart.js
@@ -132,7 +132,9 @@ $.fn.barchart = function(data) {
isValueShown = d.count === maxValue;
return text;
});
- $(this).find('[data-toggle=tooltip]').tooltip({ container: 'body', html: true });
+ $(this)
+ .find('[data-toggle=tooltip]')
+ .tooltip({ container: 'body', html: true });
}
});
};
diff --git a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
index 4534781a090..524cb75fc68 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/viewer-header-view.js
@@ -77,7 +77,9 @@ export default Marionette.ItemView.extend({
this.initialResizeHeight = $('.workspace-viewer-container').height();
const processResizing = this.processResizing.bind(this);
const stopResizing = this.stopResizing.bind(this);
- $('body').on('mousemove.workspace', processResizing).on('mouseup.workspace', stopResizing);
+ $('body')
+ .on('mousemove.workspace', processResizing)
+ .on('mouseup.workspace', stopResizing);
},
processResizing(e) {
@@ -88,7 +90,9 @@ export default Marionette.ItemView.extend({
},
stopResizing() {
- $('body').off('mousemove.workspace').off('mouseup.workspace');
+ $('body')
+ .off('mousemove.workspace')
+ .off('mouseup.workspace');
},
toFullScreen() {