From ed196d9b846ad79df8b1fc7f239497655b01de3b Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 17 Jun 2022 10:46:55 +0200 Subject: [PATCH] Fix new eslint reported issues Signed-off-by: Thomas Citharel --- js/src/components/Activity/GroupActivityItem.vue | 2 +- js/src/components/Activity/ResourceActivityItem.vue | 4 ++-- js/src/components/Editor/Image.ts | 2 +- js/src/components/Resource/ResourceItem.vue | 4 ++-- js/src/views/Event/MyEvents.vue | 2 +- js/src/views/Search.vue | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/src/components/Activity/GroupActivityItem.vue b/js/src/components/Activity/GroupActivityItem.vue index 8a58660b6..1b879a6aa 100644 --- a/js/src/components/Activity/GroupActivityItem.vue +++ b/js/src/components/Activity/GroupActivityItem.vue @@ -117,7 +117,7 @@ export default class GroupActivityItem extends mixins(ActivityMixin) { } get details(): string[] { - let details = []; + const details = []; const changes = this.subjectParams.group_changes.split(","); if (changes.includes("name") && this.subjectParams.old_group_name) { details.push("{old_group_name} was renamed to {group}."); diff --git a/js/src/components/Activity/ResourceActivityItem.vue b/js/src/components/Activity/ResourceActivityItem.vue index c178147e4..605b24a0a 100644 --- a/js/src/components/Activity/ResourceActivityItem.vue +++ b/js/src/components/Activity/ResourceActivityItem.vue @@ -150,7 +150,7 @@ export default class ResourceActivityItem extends mixins(ActivityMixin) { get path(): Location { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - let path = this.parentPath(this.activity?.object?.path); + const path = this.parentPath(this.activity?.object?.path); if (path === "") { return { name: RouteName.RESOURCE_FOLDER_ROOT, @@ -179,7 +179,7 @@ export default class ResourceActivityItem extends mixins(ActivityMixin) { } parentPath(parent: string): string { - let path = parent.split("/"); + const path = parent.split("/"); path.pop(); return path.join("/").replace(/^\//, ""); } diff --git a/js/src/components/Editor/Image.ts b/js/src/components/Editor/Image.ts index a67b82756..07918e19c 100644 --- a/js/src/components/Editor/Image.ts +++ b/js/src/components/Editor/Image.ts @@ -31,7 +31,7 @@ const CustomImage = Image.extend({ new Plugin({ props: { handleDOMEvents: { - drop(view: EditorView, event: Event) { + drop(view: EditorView, event: Event) { const realEvent = event as DragEvent; if ( !( diff --git a/js/src/components/Resource/ResourceItem.vue b/js/src/components/Resource/ResourceItem.vue index fbac3cb9e..9c5e8c7ab 100644 --- a/js/src/components/Resource/ResourceItem.vue +++ b/js/src/components/Resource/ResourceItem.vue @@ -36,8 +36,8 @@ :class="{ 'is-hidden-mobile': !inline }" v-if="resource.updatedAt || resource.publishedAt" >{{ - (resource.updatedAt || resource.publishedAt) - | formatDateTimeString + (resource.updatedAt || resource.publishedAt) | + formatDateTimeString }} diff --git a/js/src/views/Event/MyEvents.vue b/js/src/views/Event/MyEvents.vue index 30a34d994..f087648cd 100644 --- a/js/src/views/Event/MyEvents.vue +++ b/js/src/views/Event/MyEvents.vue @@ -427,7 +427,7 @@ export default class MyEvents extends Vue { } monthParticipationsIds(elements: Eventable[]): string[] { - let res = elements.filter((element: Eventable) => { + const res = elements.filter((element: Eventable) => { return "role" in element; }) as IParticipant[]; return res.map(({ event }: { event: IEvent }) => { diff --git a/js/src/views/Search.vue b/js/src/views/Search.vue index 25adff8d3..71f378a82 100644 --- a/js/src/views/Search.vue +++ b/js/src/views/Search.vue @@ -542,7 +542,7 @@ export default class Search extends Vue { } set eventCategory(eventCategory: string | null) { - let query = { ...this.$route.query, eventCategory }; + const query = { ...this.$route.query, eventCategory }; if (query.eventCategory === null) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore