diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-07-17 10:07:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 10:07:30 +0200 |
commit | d5b076b2fc8988e9a3799ba7775f851e1a12cbb7 (patch) | |
tree | 3c0f98977cc487747efeeeb47974fc13e70eab97 /server/sonar-web/src/main/js/apps/web-api | |
parent | c8797aabc9b4d705f7da59b43717e5c0fe0e80fb (diff) | |
download | sonarqube-d5b076b2fc8988e9a3799ba7775f851e1a12cbb7.tar.gz sonarqube-d5b076b2fc8988e9a3799ba7775f851e1a12cbb7.zip |
upgrade prettier and remove prettier-eslint (#2254)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/web-api')
8 files changed, 44 insertions, 21 deletions
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.js b/server/sonar-web/src/main/js/apps/web-api/components/Action.js index a62bc2c4b6e..0d09aeb6973 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Action.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.js @@ -100,7 +100,10 @@ export default class Action extends React.PureComponent { <InternalBadge /> </span>} - {action.since && <span className="spacer-left badge">since {action.since}</span>} + {action.since && + <span className="spacer-left badge"> + since {action.since} + </span>} {action.deprecatedSince && <span className="spacer-left"> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.js b/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.js index 7297daed368..1b0b5b9e0c0 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/ActionChangelog.js @@ -33,14 +33,14 @@ export default class ActionChangelog extends React.PureComponent { render() { return ( <ul className="big-spacer-top"> - {this.props.changelog.map((item, index) => ( + {this.props.changelog.map((item, index) => <li key={index} className="spacer-top"> <span className="spacer-right badge"> {item.version} </span> {item.description} </li> - ))} + )} </ul> ); } diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Domain.js b/server/sonar-web/src/main/js/apps/web-api/components/Domain.js index 0c79d15d6b8..a421f123144 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Domain.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Domain.js @@ -44,7 +44,9 @@ export default class Domain extends React.PureComponent { return ( <div className="web-api-domain"> <header className="web-api-domain-header"> - <h2 className="web-api-domain-title">{domain.path}</h2> + <h2 className="web-api-domain-title"> + {domain.path} + </h2> {domain.deprecated && <span className="spacer-left"> @@ -64,7 +66,7 @@ export default class Domain extends React.PureComponent { />} <div className="web-api-domain-actions"> - {filteredActions.map(action => ( + {filteredActions.map(action => <Action key={getActionKey(domain.path, action.key)} action={action} @@ -72,7 +74,7 @@ export default class Domain extends React.PureComponent { showDeprecated={showDeprecated} showInternal={showInternal} /> - ))} + )} </div> </div> ); diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Menu.js b/server/sonar-web/src/main/js/apps/web-api/components/Menu.js index 815cb1d4077..a3069a0f7bb 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Menu.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Menu.js @@ -53,7 +53,7 @@ export default class Menu extends React.PureComponent { <div className="api-documentation-results panel"> <TooltipsContainer> <div className="list-group"> - {filteredDomains.map(domain => ( + {filteredDomains.map(domain => <Link key={domain.path} className={classNames('list-group-item', { @@ -71,7 +71,7 @@ export default class Menu extends React.PureComponent { dangerouslySetInnerHTML={{ __html: domain.description }} />} </Link> - ))} + )} </div> </TooltipsContainer> </div> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Params.js b/server/sonar-web/src/main/js/apps/web-api/components/Params.js index ddb229fee99..cda32ebceeb 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Params.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Params.js @@ -39,10 +39,12 @@ export default class Params extends React.PureComponent { <div className="web-api-params"> <table> <tbody> - {displayedParameters.map(param => ( + {displayedParameters.map(param => <tr key={param.key}> <td className="markdown" style={{ width: 180 }}> - <code>{param.key}</code> + <code> + {param.key} + </code> {param.internal && <div className="little-spacer-top"> @@ -57,7 +59,9 @@ export default class Params extends React.PureComponent { {showDeprecated && param.deprecatedKey && <div className="little-spacer-top"> - <code>{param.deprecatedKey}</code> + <code> + {param.deprecatedKey} + </code> </div>} {showDeprecated && @@ -89,34 +93,42 @@ export default class Params extends React.PureComponent { <div> <h4>Possible values</h4> <ul className="list-styled"> - {param.possibleValues.map(value => ( + {param.possibleValues.map(value => <li key={value} className="little-spacer-top"> - <code>{value}</code> + <code> + {value} + </code> </li> - ))} + )} </ul> </div>} {param.defaultValue && <div className="little-spacer-top"> <h4>Default value</h4> - <code>{param.defaultValue}</code> + <code> + {param.defaultValue} + </code> </div>} {param.exampleValue && <div className="little-spacer-top"> <h4>Example value</h4> - <code>{param.exampleValue}</code> + <code> + {param.exampleValue} + </code> </div>} {param.maxValuesAllowed != null && <div className="little-spacer-top"> <h4>Maximum allowed values</h4> - <code>{param.maxValuesAllowed}</code> + <code> + {param.maxValuesAllowed} + </code> </div>} </td> </tr> - ))} + )} </tbody> </table> </div> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.js b/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.js index 7f9c5869e7a..88bf4973bec 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.js @@ -50,7 +50,10 @@ export default class ResponseExample extends React.PureComponent { return ( <div className="web-api-response"> - {responseExample && <pre style={{ whiteSpace: 'pre-wrap' }}>{responseExample.example}</pre>} + {responseExample && + <pre style={{ whiteSpace: 'pre-wrap' }}> + {responseExample.example} + </pre>} </div> ); } diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js index 166babf4c99..a6dd2212369 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.js @@ -148,7 +148,9 @@ export default class WebApiApp extends React.PureComponent { <div className="search-navigator-side search-navigator-side-light" style={{ top: 30 }}> <div className="web-api-page-header"> <Link to="/web_api/"> - <h1>{translate('api_documentation.page')}</h1> + <h1> + {translate('api_documentation.page')} + </h1> </Link> </div> diff --git a/server/sonar-web/src/main/js/apps/web-api/styles/web-api.css b/server/sonar-web/src/main/js/apps/web-api/styles/web-api.css index aa30002f3b3..121d9b55a35 100644 --- a/server/sonar-web/src/main/js/apps/web-api/styles/web-api.css +++ b/server/sonar-web/src/main/js/apps/web-api/styles/web-api.css @@ -32,7 +32,8 @@ line-height: 1.5; } -.web-api-domain-actions {} +.web-api-domain-actions { +} .web-api-action { padding-top: 30px; |