From d7de8b3764cf93d3b89e9c02731d477e85632abe Mon Sep 17 00:00:00 2001 From: Titus Kristiansen <titusk@stud.ntnu.no> Date: Fri, 6 May 2022 13:46:11 +0200 Subject: [PATCH] Linting --- .../ChatComponents/RentalMessage.vue | 8 +++---- .../CommunityComponents/CommunityList.vue | 5 +++- .../CommunityComponents/CommunityListItem.vue | 5 +--- .../UserProfileComponents/UserItems.vue | 23 +++++++++++-------- .../community-list-item.spec.js.snap | 2 +- .../__snapshots__/community-list.spec.js.snap | 4 ++-- 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/components/ChatComponents/RentalMessage.vue b/src/components/ChatComponents/RentalMessage.vue index 693407e..df2823f 100644 --- a/src/components/ChatComponents/RentalMessage.vue +++ b/src/components/ChatComponents/RentalMessage.vue @@ -49,7 +49,7 @@ <script> import axios from "axios"; import { tokenHeader, parseCurrentUser } from "@/utils/token-utils"; -import { getItemPictures, } from "@/utils/apiutil"; +import { getItemPictures } from "@/utils/apiutil"; export default { props: { @@ -61,7 +61,7 @@ export default { data() { return { image: null, - } + }; }, computed: { userID() { @@ -113,8 +113,8 @@ export default { if (images.length > 0) { this.image = images[0].picture; } else { - this.image = "https://images.unsplash.com/photo-1453728013993-6d66e9c9123a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dmlld3xlbnwwfHwwfHw%3D&w=1000&q=80"; - + this.image = + "https://images.unsplash.com/photo-1453728013993-6d66e9c9123a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8dmlld3xlbnwwfHwwfHw%3D&w=1000&q=80"; } }, }, diff --git a/src/components/CommunityComponents/CommunityList.vue b/src/components/CommunityComponents/CommunityList.vue index 7fb0387..136e50e 100644 --- a/src/components/CommunityComponents/CommunityList.vue +++ b/src/components/CommunityComponents/CommunityList.vue @@ -1,6 +1,9 @@ <template> <!-- A list conatining all the communities --> - <p v-if="!communities.length" class="flex place-content-center text-gray-400 mt-8"> + <p + v-if="!communities.length" + class="flex place-content-center text-gray-400 mt-8" + > Ingen grupper </p> <ul v-else> diff --git a/src/components/CommunityComponents/CommunityListItem.vue b/src/components/CommunityComponents/CommunityListItem.vue index 35ba997..bdbc170 100644 --- a/src/components/CommunityComponents/CommunityListItem.vue +++ b/src/components/CommunityComponents/CommunityListItem.vue @@ -54,10 +54,7 @@ v-if="!community.picture" class="h-10 w-10 flex flex-col justify-center items-center ml-2 mr-2" > - <UserGroupIcon - alt="Bilde" - class="h-10 w-10 text-primary-dark" - /> + <UserGroupIcon alt="Bilde" class="h-10 w-10 text-primary-dark" /> </div> <div v-else diff --git a/src/components/UserProfileComponents/UserItems.vue b/src/components/UserProfileComponents/UserItems.vue index 4088e43..dd0ca9c 100644 --- a/src/components/UserProfileComponents/UserItems.vue +++ b/src/components/UserProfileComponents/UserItems.vue @@ -40,13 +40,13 @@ :key="item" > <div class="w-full"> - <ItemCard - id="ItemCardPage" - class="ItemCard w-full h-full" - :item="item" - /> - </div> - <TripleDotButton class="DotButton" @click="openDotMenu(item)"/> + <ItemCard + id="ItemCardPage" + class="ItemCard w-full h-full" + :item="item" + /> + </div> + <TripleDotButton class="DotButton" @click="openDotMenu(item)" /> <div v-show="item.toggle" @@ -110,10 +110,13 @@ > <div class="cardContainer" v-for="item in searchedItems" :key="item"> <div class="w-full"> - <ItemCard id="ItemCardSearch" class="ItemCard w-full h-full" :item="item" /> + <ItemCard + id="ItemCardSearch" + class="ItemCard w-full h-full" + :item="item" + /> </div> - <TripleDotButton class="DotButton" @click="openDotMenu(item)"/> - + <TripleDotButton class="DotButton" @click="openDotMenu(item)" /> <div v-show="item.toggle" diff --git a/tests/unit/component-tests/community-component-tests/__snapshots__/community-list-item.spec.js.snap b/tests/unit/component-tests/community-component-tests/__snapshots__/community-list-item.spec.js.snap index 33c093a..d52b806 100644 --- a/tests/unit/component-tests/community-component-tests/__snapshots__/community-list-item.spec.js.snap +++ b/tests/unit/component-tests/community-component-tests/__snapshots__/community-list-item.spec.js.snap @@ -14,7 +14,7 @@ exports[`CommunityListItem component renders correctly 1`] = ` > <img alt="Bilde" - class="rounded-md" + class="rounded-md h-14 w-14 object-contain" src="string" /> </div> diff --git a/tests/unit/component-tests/community-component-tests/__snapshots__/community-list.spec.js.snap b/tests/unit/component-tests/community-component-tests/__snapshots__/community-list.spec.js.snap index 621d0dc..c1b47cc 100644 --- a/tests/unit/component-tests/community-component-tests/__snapshots__/community-list.spec.js.snap +++ b/tests/unit/component-tests/community-component-tests/__snapshots__/community-list.spec.js.snap @@ -24,7 +24,7 @@ exports[`CommunityList component renders correctly 1`] = ` > <img alt="Bilde" - class="rounded-md" + class="rounded-md h-14 w-14 object-contain" src="string" /> </div> @@ -75,7 +75,7 @@ exports[`CommunityList component renders correctly 1`] = ` > <img alt="Bilde" - class="rounded-md" + class="rounded-md h-14 w-14 object-contain" src="string" /> </div> -- GitLab