Skip to content

Commit e0d00d6

Browse files
committed
chore: lint fix
1 parent e21f7dd commit e0d00d6

18 files changed

+526
-365
lines changed

app/components/AppAlert.vue

+36-27
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<script lang="ts">
2-
import { defineComponent } from 'vue'
3-
import IconCheckCircle from './icons/IconCheckCircle.vue'
4-
import IconXCircle from './icons/IconXCircle.vue'
5-
import AppModal from './AppModal.vue'
2+
import { defineComponent } from "vue";
3+
import IconCheckCircle from "./icons/IconCheckCircle.vue";
4+
import IconXCircle from "./icons/IconXCircle.vue";
5+
import AppModal from "./AppModal.vue";
66
77
interface Data {
8-
type: 'success' | 'error'
9-
title: string
10-
text: string
8+
type: "success" | "error";
9+
title: string;
10+
text: string;
1111
}
1212
1313
interface Classes {
14-
success: boolean
15-
error: boolean
14+
success: boolean;
15+
error: boolean;
1616
}
1717
1818
export default defineComponent({
@@ -21,40 +21,46 @@ export default defineComponent({
2121
},
2222
2323
computed: {
24-
data (): Data {
25-
return this.$store.state.modal.data
24+
data(): Data {
25+
return this.$store.state.modal.data;
2626
},
2727
28-
classes (): Classes {
28+
classes(): Classes {
2929
return {
30-
success: this.data.type === 'success',
31-
error: this.data.type === 'error'
32-
}
30+
success: this.data.type === "success",
31+
error: this.data.type === "error"
32+
};
3333
},
3434
35-
icon () {
36-
if (this.data.type === 'error') {
37-
return IconXCircle
35+
icon() {
36+
if (this.data.type === "error") {
37+
return IconXCircle;
3838
}
3939
40-
return IconCheckCircle
40+
return IconCheckCircle;
4141
}
4242
},
4343
4444
methods: {
45-
close (): void {
46-
this.$store.dispatch('alert/close')
45+
close(): void {
46+
this.$store.dispatch("alert/close");
4747
}
4848
}
49-
})
49+
});
5050
</script>
5151

5252
<template>
5353
<AppModal name="alert">
54-
<div class="AppAlert" :class="classes">
54+
<div
55+
class="AppAlert"
56+
:class="classes"
57+
>
5558
<div class="box">
5659
<div class="status">
57-
<component :is="icon" class="status-icon" />
60+
<component
61+
:is="icon"
62+
class="status-icon"
63+
/>
5864
</div>
5965

6066
<div class="body">
@@ -67,15 +73,18 @@ export default defineComponent({
6773
</div>
6874

6975
<div class="action">
70-
<button class="button" @click="close">{{ $t('components.AppAlert.close') }}</button>
76+
<button
77+
class="button"
78+
@click="close"
79+
>
80+
{{ $t('components.AppAlert.close') }}
81+
</button>
7182
</div>
7283
</div>
7384
</div>
7485
</AppModal>
7586
</template>
7687

77-
78-
7988
<style lang="postcss" scoped>
8089
@import '@/assets/styles/variables';
8190

app/components/AppBackdrop.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
withDefaults(defineProps<{ show: boolean}>(), { show: false });
2+
withDefaults(defineProps<{ show: boolean }>(), { show: false });
33
</script>
44

55
<template>

app/components/AppDialog.vue

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import { defineComponent } from 'vue'
3-
import IconPreloaderDark from './icons/IconPreloaderDark.vue'
4-
import AppModal from './AppModal.vue'
2+
import { defineComponent } from "vue";
3+
import IconPreloaderDark from "./icons/IconPreloaderDark.vue";
4+
import AppModal from "./AppModal.vue";
55
66
export default defineComponent({
77
components: {
@@ -10,11 +10,11 @@ export default defineComponent({
1010
},
1111
1212
computed: {
13-
title (): string {
14-
return this.$store.state.modal.data.title
13+
title(): string {
14+
return this.$store.state.modal.data.title;
1515
}
1616
}
17-
})
17+
});
1818
</script>
1919

2020
<template>
@@ -33,8 +33,6 @@ export default defineComponent({
3333
</AppModal>
3434
</template>
3535

36-
37-
3836
<style lang="postcss" scoped>
3937
@import '@/assets/styles/variables';
4038

app/components/AppModal.vue

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent } from 'vue'
2+
import { defineComponent } from "vue";
33
44
export default defineComponent({
55
props: {
@@ -8,24 +8,25 @@ export default defineComponent({
88
99
computed: {
1010
show(): boolean {
11-
return (this.$store as any).state.modal.name === this.name
11+
return (this.$store as any).state.modal.name === this.name;
1212
}
1313
}
14-
})
14+
});
1515
</script>
1616

1717
<template>
1818
<portal to="modal">
1919
<transition name="fade">
20-
<div v-if="show" class="AppModal">
20+
<div
21+
v-if="show"
22+
class="AppModal"
23+
>
2124
<slot />
2225
</div>
2326
</transition>
2427
</portal>
2528
</template>
2629

27-
28-
2930
<style lang="postcss" scoped>
3031
@import '@/assets/styles/variables';
3132

app/components/ButtonOutline.vue

+28-13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script lang="ts">
2-
import { defineComponent } from 'vue'
3-
import { isExternalLink } from '~/_legacy/support/Url'
2+
import { defineComponent } from "vue";
3+
import { isExternalLink } from "~/_legacy/support/Url";
44
55
export default defineComponent({
66
props: {
7-
tag: { type: String, default: 'button' },
7+
tag: { type: String, default: "button" },
88
block: { type: Boolean, default: false },
99
icon: { type: Object, default: null },
1010
label: { type: String, required: true },
@@ -13,25 +13,40 @@ export default defineComponent({
1313
},
1414
1515
computed: {
16-
link (): string | null {
17-
return this.href || this.to
16+
link(): string | null {
17+
return this.href || this.to;
1818
},
1919
20-
isExternalLink (): boolean {
21-
return this.link ? isExternalLink(this.link) : false
20+
isExternalLink(): boolean {
21+
return this.link ? isExternalLink(this.link) : false;
2222
},
2323
24-
target (): string {
25-
return this.isExternalLink ? '_blank' : '_self'
24+
target(): string {
25+
return this.isExternalLink ? "_blank" : "_self";
2626
}
2727
}
28-
})
28+
});
2929
</script>
3030

3131
<template>
32-
<div class="ButtonOutline" role="button" :class="{ block }" @click="$emit('click')">
33-
<Component :is="tag" class="button" :to="href" :href="href" :target="target">
34-
<Component :is="icon" v-if="icon" class="icon" />
32+
<div
33+
class="ButtonOutline"
34+
role="button"
35+
:class="{ block }"
36+
@click="$emit('click')"
37+
>
38+
<Component
39+
:is="tag"
40+
class="button"
41+
:to="href"
42+
:href="href"
43+
:target="target"
44+
>
45+
<Component
46+
:is="icon"
47+
v-if="icon"
48+
class="icon"
49+
/>
3550
<span class="label">{{ label }}</span>
3651
</Component>
3752
</div>

app/components/ChatStack.vue

+19-25
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
1-
<script lang="ts">
2-
import { defineComponent } from 'vue'
3-
import type { PropOptions } from 'vue'
4-
import ChatStackItem from './ChatStackItem.vue'
5-
6-
7-
interface Chat {
8-
direction: 'left' | 'right'
9-
avatar: string
10-
alt: string
11-
name: string
12-
time: string
13-
body: string
14-
}
15-
16-
export default defineComponent({
17-
components: {
18-
ChatStackItem
19-
},
20-
21-
props: {
22-
chats: { type: Array, required: true } as PropOptions<Chat[]>
23-
}
24-
})
1+
<script setup lang="ts">
2+
import ChatStackItem from "./ChatStackItem.vue";
3+
4+
defineProps<{
5+
chats: {
6+
direction: "left" | "right";
7+
avatar: string;
8+
alt: string;
9+
name: string;
10+
time: string;
11+
body: string;
12+
}[];
13+
}>();
2514
</script>
2615

2716
<template>
2817
<div class="ChatStack">
29-
<div v-for="(chat, index) in chats" :key="index" class="chat" :class="chat.direction">
18+
<div
19+
v-for="(chat, index) in chats"
20+
:key="index"
21+
class="chat"
22+
:class="chat.direction"
23+
>
3024
<ChatStackItem :chat="chat" />
3125
</div>
3226
</div>

app/components/ChatStackItem.vue

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
<script lang="ts">
2-
import { defineComponent } from 'vue'
3-
import type { PropOptions } from 'vue'
4-
5-
interface Chat {
6-
direction: 'left' | 'right'
7-
avatar: string
8-
alt: string
9-
name: string
10-
time: string
11-
body: string
12-
}
13-
14-
export default defineComponent({
15-
props: {
16-
chat: { type: Object, required: true } as PropOptions<Chat>
17-
}
18-
})
1+
<script setup lang="ts">
2+
defineProps<{
3+
chat: {
4+
direction: "left" | "right";
5+
avatar: string;
6+
alt: string;
7+
name: string;
8+
time: string;
9+
body: string;
10+
};
11+
}>();
1912
</script>
2013

2114
<template>
22-
<div class="ChatStackItem" :class="chat.direction">
15+
<div
16+
class="ChatStackItem"
17+
:class="chat.direction"
18+
>
2319
<figure class="avatar">
24-
<img class="avatar-img" :src="chat.avatar" :alt="chat.alt">
20+
<img
21+
class="avatar-img"
22+
:src="chat.avatar"
23+
:alt="chat.alt"
24+
>
2525
</figure>
2626

2727
<div class="box">

0 commit comments

Comments
 (0)