Fix eslint warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-27 19:27:44 +01:00
parent 487ac56b4c
commit da42522073
130 changed files with 702 additions and 734 deletions

View File

@@ -353,8 +353,13 @@ import IdentityPickerWrapper from "@/views/Account/IdentityPickerWrapper.vue";
import Subtitle from "@/components/Utils/Subtitle.vue";
import { Route } from "vue-router";
import { formatList } from "@/utils/i18n";
import { CommentModeration } from "../../types/event-options.model";
import { ParticipantRole } from "../../types/participant.model";
import {
CommentModeration,
EventJoinOptions,
EventStatus,
EventVisibility,
ParticipantRole,
} from "@/types/enums";
import OrganizerPickerWrapper from "../../components/Event/OrganizerPickerWrapper.vue";
import {
CREATE_EVENT,
@@ -362,13 +367,7 @@ import {
EVENT_PERSON_PARTICIPATION,
FETCH_EVENT,
} from "../../graphql/event";
import {
EventJoinOptions,
EventModel,
EventStatus,
EventVisibility,
IEvent,
} from "../../types/event.model";
import { EventModel, IEvent } from "../../types/event.model";
import {
CURRENT_ACTOR_CLIENT,
LOGGED_USER_DRAFTS,
@@ -837,9 +836,9 @@ export default class EditEvent extends Vue {
/**
* Confirm cancel
*/
confirmGoElsewhere(callback: (value?: string) => any): void | Function {
confirmGoElsewhere(callback: (value?: string) => any): void {
if (!this.isEventModified) {
return callback();
callback();
}
const title: string = this.isUpdate
? (this.$t("Cancel edition") as string)
@@ -872,7 +871,8 @@ export default class EditEvent extends Vue {
this.confirmGoElsewhere(() => this.$router.go(-1));
}
beforeRouteLeave(to: Route, from: Route, next: Function): void {
// eslint-disable-next-line consistent-return
beforeRouteLeave(to: Route, from: Route, next: () => void): void {
if (to.name === RouteName.EVENT) return next();
this.confirmGoElsewhere(() => next());
}

View File

@@ -504,6 +504,7 @@
<script lang="ts">
import { Component, Prop, Watch } from "vue-property-decorator";
import BIcon from "buefy/src/components/icon/Icon.vue";
import { EventJoinOptions, EventStatus, EventVisibility, ParticipantRole } from "@/types/enums";
import {
EVENT_PERSON_PARTICIPATION,
EVENT_PERSON_PARTICIPATION_SUBSCRIPTION_CHANGED,
@@ -511,13 +512,7 @@ import {
JOIN_EVENT,
} from "../../graphql/event";
import { CURRENT_ACTOR_CLIENT } from "../../graphql/actor";
import {
EventModel,
EventStatus,
EventVisibility,
IEvent,
EventJoinOptions,
} from "../../types/event.model";
import { EventModel, IEvent } from "../../types/event.model";
import { IActor, IPerson, Person, usernameWithDomain } from "../../types/actor";
import { GRAPHQL_API_ENDPOINT } from "../../api/_entrypoint";
import DateCalendarIcon from "../../components/Event/DateCalendarIcon.vue";
@@ -546,7 +541,7 @@ import Tag from "../../components/Tag.vue";
import EventMetadataBlock from "../../components/Event/EventMetadataBlock.vue";
import ActorCard from "../../components/Account/ActorCard.vue";
import PopoverActorCard from "../../components/Account/PopoverActorCard.vue";
import { IParticipant, ParticipantRole } from "../../types/participant.model";
import { IParticipant } from "../../types/participant.model";
@Component({
components: {

View File

@@ -74,7 +74,8 @@ import Subtitle from "@/components/Utils/Subtitle.vue";
import EventListViewCard from "@/components/Event/EventListViewCard.vue";
import { CURRENT_ACTOR_CLIENT, PERSON_MEMBERSHIPS } from "@/graphql/actor";
import GroupMixin from "@/mixins/group";
import { IGroup, IMember, IPerson, usernameWithDomain } from "../../types/actor";
import { IMember } from "@/types/actor/member.model";
import { IGroup, IPerson, usernameWithDomain } from "../../types/actor";
@Component({
apollo: {

View File

@@ -88,7 +88,8 @@
<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { IParticipant, Participant, ParticipantRole } from "../../types/participant.model";
import { ParticipantRole } from "@/types/enums";
import { IParticipant, Participant } from "../../types/participant.model";
import { LOGGED_USER_PARTICIPATIONS, LOGGED_USER_DRAFTS } from "../../graphql/actor";
import { EventModel, IEvent } from "../../types/event.model";
import EventListCard from "../../components/Event/EventListCard.vue";

View File

@@ -185,7 +185,8 @@
<script lang="ts">
import { Component, Prop, Vue, Watch, Ref } from "vue-property-decorator";
import { IParticipant, ParticipantRole } from "../../types/participant.model";
import { ParticipantRole } from "@/types/enums";
import { IParticipant } from "../../types/participant.model";
import { IEvent, IEventParticipantStats } from "../../types/event.model";
import { PARTICIPANTS, UPDATE_PARTICIPANT } from "../../graphql/event";
import { CURRENT_ACTOR_CLIENT } from "../../graphql/actor";