Lint files with prettier

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-05-17 19:01:08 +02:00
parent 68e223e480
commit 0e15abfc26
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
18 changed files with 72 additions and 65 deletions

View File

@ -60,7 +60,8 @@ const CustomImage = Image.extend({
top: realEvent.clientY,
});
if (!coordinates) return false;
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const client =
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
try {
images.forEach(async (image) => {

View File

@ -8,7 +8,8 @@ import apolloProvider from "@/vue-apollo";
import { IPerson } from "@/types/actor";
import pDebounce from "p-debounce";
const client = apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const client =
apolloProvider.defaultClient as ApolloClient<NormalizedCacheObject>;
const fetchItems = async (query: string): Promise<IPerson[]> => {
const result = await client.query({

View File

@ -14,9 +14,8 @@ export default class IdentityEditionMixin extends Mixins(Vue) {
);
if (this.identity.preferredUsername === oldUsername) {
this.identity.preferredUsername = IdentityEditionMixin.convertToUsername(
newDisplayName
);
this.identity.preferredUsername =
IdentityEditionMixin.convertToUsername(newDisplayName);
}
this.oldDisplayName = newDisplayName;

View File

@ -344,14 +344,16 @@ export default class AdminGroupProfile extends Vue {
}
confirmSuspendProfile(): void {
const message = (this.group.domain
const message = (
this.group.domain
? this.$t(
"Are you sure you want to <b>suspend</b> this group? As this group originates from instance {instance}, this will only remove local members and delete the local data, as well as rejecting all the future data.",
{ instance: this.group.domain }
)
: this.$t(
"Are you sure you want to <b>suspend</b> this group? All members - including remote ones - will be notified and removed from the group, and <b>all of the group data (events, posts, discussions, todos…) will be irretrievably destroyed</b>."
)) as string;
)
) as string;
this.$buefy.dialog.confirm({
title: this.$t("Suspend group") as string,

View File

@ -774,9 +774,11 @@ export default class EditEvent extends Vue {
get updateEventMessage(): string {
if (this.unmodifiedEvent.draft && !this.event.draft)
return this.$i18n.t("The event has been updated and published") as string;
return (this.event.draft
return (
this.event.draft
? this.$i18n.t("The draft event has been updated")
: this.$i18n.t("The event has been updated")) as string;
: this.$i18n.t("The event has been updated")
) as string;
}
private handleError(err: any) {

View File

@ -874,7 +874,8 @@ export default class Event extends EventMixin {
try {
if (window.isSecureContext) {
this.anonymousParticipation = await this.anonymousParticipationConfirmed();
this.anonymousParticipation =
await this.anonymousParticipationConfirmed();
}
} catch (e) {
if (e instanceof AnonymousParticipationNotFoundError) {

View File

@ -562,7 +562,8 @@ export default class Resources extends Mixins(ResourceMixin) {
const updatedResource: IResource = data.updateResource;
// eslint-disable-next-line vue/max-len
oldParentCachedResource.children.elements = oldParentCachedResource.children.elements.filter(
oldParentCachedResource.children.elements =
oldParentCachedResource.children.elements.filter(
(cachedResource) => cachedResource.id !== updatedResource.id
);

View File

@ -155,7 +155,10 @@
<div class="container">
<div class="columns">
<div
class="column is-one-third-desktop is-offset-one-third-desktop"
class="
column
is-one-third-desktop is-offset-one-third-desktop
"
>
<h1 class="title">
{{ $t("Deleting your Mobilizon account") }}

View File

@ -251,8 +251,10 @@ export default class Notifications extends Vue {
if (this.loggedUser && this.loggedUser.settings) {
this.notificationOnDay = this.loggedUser.settings.notificationOnDay;
this.notificationEachWeek = this.loggedUser.settings.notificationEachWeek;
this.notificationBeforeEvent = this.loggedUser.settings.notificationBeforeEvent;
this.notificationPendingParticipation = this.loggedUser.settings.notificationPendingParticipation;
this.notificationBeforeEvent =
this.loggedUser.settings.notificationBeforeEvent;
this.notificationPendingParticipation =
this.loggedUser.settings.notificationPendingParticipation;
}
}

View File

@ -106,10 +106,8 @@ const decreaseFetches = () => {
Cypress.env("fetchCount", count - 1);
};
const buildTrackableFetchWithSessionId = (fetch) => (
fetchUrl,
fetchOptions
) => {
const buildTrackableFetchWithSessionId =
(fetch) => (fetchUrl, fetchOptions) => {
const { headers } = fetchOptions;
const modifiedHeaders = {
"x-session-id": Cypress.env("sessionId"),

View File

@ -74,8 +74,7 @@ export const eventCommentThreadsMock = {
__typename: "Comment",
id: "2",
uuid: "e37910ea-fd5a-4756-9679-00971f3f4107",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107",
text: "my comment text",
local: true,
visibility: "PUBLIC",
@ -100,8 +99,7 @@ export const eventCommentThreadsMock = {
__typename: "Comment",
id: "29",
uuid: "e37910ea-fd5a-4756-9679-01171f3f4107",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107",
text: "a second comment",
local: true,
visibility: "PUBLIC",
@ -139,8 +137,7 @@ export const newCommentForEventResponse: DataMock = {
__typename: "Comment",
id: "79",
uuid: "e37910ea-fd5a-4756-9679-01171f3f4444",
url:
"https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444",
text: newCommentForEventMock.text,
local: true,
visibility: "PUBLIC",