apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -27,10 +27,7 @@ class ChangesetAuthor extends React.Component<Props> {
renderWithMail(name: string, mail: string) {
const { t } = this.props;
return (
<a
href={"mailto:" + mail}
title={t("changeset.author.mailto") + " " + mail}
>
<a href={"mailto:" + mail} title={t("changeset.author.mailto") + " " + mail}>
{name}
</a>
);

View File

@@ -19,18 +19,8 @@ class ChangesetButtonGroup extends React.Component<Props> {
const sourcesLink = createSourcesLink(repository, changeset);
return (
<ButtonAddons className="is-marginless">
<Button
link={changesetLink}
icon="exchange-alt"
label={t("changeset.buttons.details")}
reducedMobile={true}
/>
<Button
link={sourcesLink}
icon="code"
label={t("changeset.buttons.sources")}
reducedMobile={true}
/>
<Button link={changesetLink} icon="exchange-alt" label={t("changeset.buttons.details")} reducedMobile={true} />
<Button link={sourcesLink} icon="code" label={t("changeset.buttons.sources")} reducedMobile={true} />
</ButtonAddons>
);
}

View File

@@ -28,11 +28,7 @@ class ChangesetDiff extends React.Component<Props> {
render() {
const { changeset, defaultCollapse, t } = this.props;
if (!this.isDiffSupported(changeset)) {
return (
<Notification type="danger">
{t("changeset.diffNotSupported")}
</Notification>
);
return <Notification type="danger">{t("changeset.diffNotSupported")}</Notification>;
} else {
const url = this.createUrl(changeset);
return <LoadingDiff url={url} defaultCollapse={defaultCollapse} />;

View File

@@ -12,13 +12,7 @@ class ChangesetList extends React.Component<Props> {
render() {
const { repository, changesets } = this.props;
const content = changesets.map(changeset => {
return (
<ChangesetRow
key={changeset.id}
repository={repository}
changeset={changeset}
/>
);
return <ChangesetRow key={changeset.id} repository={repository} changeset={changeset} />;
});
return <>{content}</>;
}

View File

@@ -98,18 +98,10 @@ class ChangesetRow extends React.Component<Props> {
</ExtensionPoint>
</h4>
<p className="is-hidden-touch">
<Interpolate
i18nKey="changeset.summary"
id={changesetId}
time={dateFromNow}
/>
<Interpolate i18nKey="changeset.summary" id={changesetId} time={dateFromNow} />
</p>
<p className="is-hidden-desktop">
<Interpolate
i18nKey="changeset.shortSummary"
id={changesetId}
time={dateFromNow}
/>
<Interpolate i18nKey="changeset.shortSummary" id={changesetId} time={dateFromNow} />
</p>
<AuthorWrapper className="is-size-7">
<ChangesetAuthor changeset={changeset} />
@@ -123,10 +115,7 @@ class ChangesetRow extends React.Component<Props> {
</div>
</div>
<VCenteredChildColumn className={classNames("column", "is-flex")}>
<ChangesetButtonGroup
repository={repository}
changeset={changeset}
/>
<ChangesetButtonGroup repository={repository} changeset={changeset} />
<ExtensionPoint
name="changeset.right"
props={{

View File

@@ -17,10 +17,7 @@ class ChangesetTagsCollapsed extends React.Component<Props> {
const message = tags.map(tag => tag.name).join(", ");
return (
<Tooltip location="top" message={message}>
<ChangesetTagBase
icon="tags"
label={tags.length + " " + t("changeset.tags")}
/>
<ChangesetTagBase icon="tags" label={tags.length + " " + t("changeset.tags")} />
</Tooltip>
);
}

View File

@@ -5,17 +5,11 @@ export type Description = {
message: string;
};
export function createChangesetLink(
repository: Repository,
changeset: Changeset
) {
export function createChangesetLink(repository: Repository, changeset: Changeset) {
return `/repo/${repository.namespace}/${repository.name}/changeset/${changeset.id}`;
}
export function createSourcesLink(
repository: Repository,
changeset: Changeset
) {
export function createSourcesLink(repository: Repository, changeset: Changeset) {
return `/repo/${repository.namespace}/${repository.name}/sources/${changeset.id}`;
}