ci: remove prettier and use eslint for formatting

This commit is contained in:
2024-02-02 14:46:42 +01:00
parent 6ff8688760
commit b1e04077f9
20 changed files with 222 additions and 383 deletions
+2 -4
View File
@@ -5,9 +5,7 @@
>
<v-flex xs12 sm6>
<v-icon>mdi-home</v-icon>
<span
><strong>{{ distance.origin }}</strong></span
>
<span><strong>{{ distance.origin }}</strong></span>
</v-flex>
<v-flex xs12 sm6>
<v-icon>mdi-car</v-icon>
@@ -30,7 +28,7 @@ export default defineComponent({
required: true
}
},
setup(props) {
setup (props) {
const numericDistance = computed(() =>
Number(props.distance.distance / 1000).toLocaleString('sv-SE', {
minimumFractionDigits: 2,
+61 -47
View File
@@ -1,102 +1,116 @@
<template>
<v-card flat outlined rounded class='mx-3 my-3 rounded-xl'>
<v-card flat outlined rounded class="mx-3 my-3 rounded-xl">
<v-card-title primary-title>
<h3 class='headline mb-0'>
<h3 class="headline mb-0">
<v-icon
v-if='hasUser'
class='ml-1 mr-1'
v-if="hasUser"
class="ml-1 mr-1"
medium
title="Dölj"
@click="toggleIgnore('band', event.band.name)"
>mdi-eye-off</v-icon
>{{ event.band.name }}
>
mdi-eye-off
</v-icon>{{ event.band.name }}
</h3>
</v-card-title>
<v-container>
<v-layout row wrap>
<v-flex xs12 sm6
><strong class='mr-1' v-text="$t('events.date')" />{{
<v-flex
xs12
sm6
>
<strong class="mr-1" v-text="$t('events.date')" />{{
event.date
}}
({{ weekday }} {{ daysUntil }})
</v-flex
>
<v-flex v-if='event.time' xs12 sm6
><strong class='mr-1' v-text="$t('events.time')" />{{
</v-flex>
<v-flex v-if="event.time" xs12 sm6>
<strong class="mr-1" v-text="$t('events.time')" />{{
event.time
}}
</v-flex
>
</v-flex>
</v-layout>
<v-layout row wrap>
<v-flex xs12 sm6 md3
><strong class='mr-1' v-text="$t('events.hall')" />
<v-flex
xs12
sm6
md3
>
<strong class="mr-1" v-text="$t('events.hall')" />
<v-icon
v-if='hasUser'
class='ml-1 mr-1'
v-if="hasUser"
class="ml-1 mr-1"
small
:title="$t('events.hide')"
@click="toggleIgnore('danceHall', event.danceHall.name)"
>mdi-eye-off
</v-icon
>
mdi-eye-off
</v-icon>
{{ event.danceHall.name }}
</v-flex
</v-flex>
<v-flex
xs12
sm6
md3
>
<v-flex xs12 sm6 md3
><strong class='mr-1' v-text="$t('events.city')" />
<strong class="mr-1" v-text="$t('events.city')" />
<v-icon
v-if='hasUser'
class='ml-1 mr-1'
v-if="hasUser"
class="ml-1 mr-1"
small
:title="$t('events.hide')"
@click="toggleIgnore('city', event.danceHall.city)"
>mdi-eye-off
</v-icon
>
mdi-eye-off
</v-icon>
{{ event.danceHall.city }}
</v-flex
</v-flex>
<v-flex
xs12
sm6
md3
>
<v-flex xs12 sm6 md3
><strong class='mr-1' v-text="$t('events.municipality')" />
<strong class="mr-1" v-text="$t('events.municipality')" />
<v-icon
v-if='hasUser'
class='ml-1 mr-1'
v-if="hasUser"
class="ml-1 mr-1"
small
:title="$t('events.hide')"
@click="
toggleIgnore('municipality', event.danceHall.municipality)
"
>mdi-eye-off
</v-icon
>
mdi-eye-off
</v-icon>
{{ event.danceHall.municipality }}
</v-flex
</v-flex>
<v-flex
xs12
sm6
md3
>
<v-flex xs12 sm6 md3
><strong class='mr-1' v-text="$t('events.state')" />
<strong class="mr-1" v-text="$t('events.state')" />
<v-icon
v-if='hasUser'
class='ml-1 mr-1'
v-if="hasUser"
class="ml-1 mr-1"
small
:title="$t('events.hide')"
@click="toggleIgnore('state', event.danceHall.state)"
>mdi-eye-off
</v-icon
>
mdi-eye-off
</v-icon>
{{ event.danceHall.state }}
</v-flex
>
</v-flex>
</v-layout>
<distance-display v-for='distance in event.distances' :key='distance.origin' :distance='distance'/>
<distance-display v-for="distance in event.distances" :key="distance.origin" :distance="distance" />
</v-container>
</v-card>
</template>
<script lang='ts'>
// eslint-disable-next-line import/no-duplicates
import { format, formatDistanceToNow, parseISO } from 'date-fns'
// eslint-disable-next-line import/no-duplicates
import { enGB, sv } from 'date-fns/locale'
import { computed, defineComponent, getCurrentInstance, PropType } from 'vue'
import { Event } from '~/graphql/generated/operations'
@@ -119,7 +133,7 @@ export default defineComponent({
required: true
}
},
setup(props) {
setup (props) {
const instance = getCurrentInstance()
const locale = computed(() => (instance?.proxy.$i18n.locale ?? 'sv') === 'en' ? enGB : sv)
const time = computed(() => (props.event.time || '').split('-')[0].replace('.', ':'))