From 149a985f58ab5f517947936562f2a55623898a11 Mon Sep 17 00:00:00 2001 From: Romitou Date: Tue, 25 Jun 2024 19:51:03 +0200 Subject: [PATCH] :art: Comply with Biome rules --- biome.json | 11 +++++ components/ActiveBadge.vue | 4 +- components/GameCard.vue | 14 +++--- components/GameLog.vue | 6 +-- components/ModifierCard.vue | 8 +-- components/PlayerCard.vue | 8 +-- components/RankBadge.vue | 4 +- components/UpcomingGame.vue | 1 - pages/discordLogin.vue | 2 +- pages/index.vue | 8 ++- plugins/vue3-toastify.client.ts | 8 +-- typings/api.ts | 88 ++++++++++++++++----------------- 12 files changed, 89 insertions(+), 73 deletions(-) diff --git a/biome.json b/biome.json index 5fde9a0..62ef3ce 100644 --- a/biome.json +++ b/biome.json @@ -18,5 +18,16 @@ "rules": { "recommended": true } + }, + "javascript": { + "formatter": { + "arrowParentheses": "always", + "bracketSameLine": false, + "bracketSpacing": true, + "quoteStyle": "single", + "quoteProperties": "asNeeded", + "semicolons": "always", + "trailingCommas": "all" + } } } diff --git a/components/ActiveBadge.vue b/components/ActiveBadge.vue index 2bd2427..53e402b 100644 --- a/components/ActiveBadge.vue +++ b/components/ActiveBadge.vue @@ -11,7 +11,7 @@ const props = defineProps({ active: { type: Boolean, - required: true - } + required: true, + }, }); diff --git a/components/GameCard.vue b/components/GameCard.vue index d4a07a8..f154aad 100644 --- a/components/GameCard.vue +++ b/components/GameCard.vue @@ -29,8 +29,8 @@ import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime.js'; import 'dayjs/locale/fr.js'; -import { PropType } from 'vue/dist/vue'; -import { Game } from '~/typings/api'; +import type { PropType } from 'vue/dist/vue'; +import type { Game } from '~/typings/api'; // eslint-disable-next-line import/no-named-as-default-member dayjs.locale('fr'); @@ -40,13 +40,13 @@ dayjs.extend(relativeTime); const props = defineProps({ game: { type: Object as PropType, - required: true + required: true, }, selected: { type: Boolean, required: false, - default: false - } + default: false, + }, }); const isArchived = (game: Game) => { @@ -54,7 +54,9 @@ const isArchived = (game: Game) => { }; const format = (timestamp: number) => { - if (!timestamp || timestamp === -1) { return 'À venir'; } + if (!timestamp || timestamp === -1) { + return 'À venir'; + } const formatted = dayjs(timestamp).fromNow(); return formatted.charAt(0).toUpperCase() + formatted.slice(1); }; diff --git a/components/GameLog.vue b/components/GameLog.vue index 2fe2da4..fc4d80b 100644 --- a/components/GameLog.vue +++ b/components/GameLog.vue @@ -24,13 +24,13 @@ const props = defineProps({ log: { type: String, - required: true + required: true, }, last: { type: Boolean, required: false, - default: false - } + default: false, + }, }); diff --git a/components/ModifierCard.vue b/components/ModifierCard.vue index 8c18d48..7ca62f9 100644 --- a/components/ModifierCard.vue +++ b/components/ModifierCard.vue @@ -15,14 +15,14 @@ diff --git a/components/RankBadge.vue b/components/RankBadge.vue index f8ab2b6..fd43738 100644 --- a/components/RankBadge.vue +++ b/components/RankBadge.vue @@ -20,8 +20,8 @@ const props = defineProps({ rank: { type: String, - required: true - } + required: true, + }, }); diff --git a/components/UpcomingGame.vue b/components/UpcomingGame.vue index e09ef3d..b32917b 100644 --- a/components/UpcomingGame.vue +++ b/components/UpcomingGame.vue @@ -30,7 +30,6 @@