diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-04-20 11:10:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 11:10:13 +0200 |
commit | f6e90fdc19e222b3b238f0f5995a8039b7db158e (patch) | |
tree | 69c22415cb50a650b046ce4b9a9ac99e57695dfd /server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js | |
parent | 36c9fa041018d7eed91f1d22e0c5eda075737ebc (diff) | |
download | sonarqube-f6e90fdc19e222b3b238f0f5995a8039b7db158e.tar.gz sonarqube-f6e90fdc19e222b3b238f0f5995a8039b7db158e.zip |
upgrade prettier (#1954)
Diffstat (limited to 'server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js')
-rw-r--r-- | server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js | 12 |
1 files changed, 7 insertions, 5 deletions
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 a1e842b1629..e8eac0e1f19 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerBase.js @@ -66,12 +66,12 @@ type Props = { displayAllIssues: boolean, filterLine?: (line: SourceLine) => boolean, highlightedLine?: number, - loadComponent: (string) => Promise<*>, + loadComponent: string => Promise<*>, loadIssues: (string, number, number) => Promise<*>, loadSources: (string, number, number) => Promise<*>, onLoaded?: (component: Object, sources: Array<*>, issues: Array<*>) => void, - onIssueChange?: (Issue) => void, - onIssueSelect?: (string) => void, + onIssueChange?: Issue => void, + onIssueSelect?: string => void, onIssueUnselect?: () => void, onReceiveComponent: ({ canMarkAsFavorite: boolean, fav: boolean, key: string }) => void, selectedIssue?: string @@ -532,7 +532,9 @@ export default class SourceViewerBase extends React.PureComponent { handleIssueChange = (issue: Issue) => { this.setState(state => { - const issues = state.issues.map(candidate => candidate.key === issue.key ? issue : candidate); + const issues = state.issues.map( + candidate => (candidate.key === issue.key ? issue : candidate) + ); return { issues, issuesByLine: issuesByLine(issues) }; }); if (this.props.onIssueChange) { @@ -613,7 +615,7 @@ export default class SourceViewerBase extends React.PureComponent { : null; return ( - <div className={className} ref={node => this.node = node}> + <div className={className} ref={node => (this.node = node)}> <SourceViewerHeader component={this.state.component} openNewWindow={this.openNewWindow} |