Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Vue ESLint config #626

Draft
wants to merge 2 commits into
base: volebna-kalkulacka
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
507 changes: 464 additions & 43 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@vercel/node": "^2.6.3",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.0.2",
"@vue/tsconfig": "^0.4.0",
"cypress": "^13.6.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

export interface Props {
candidates?: Candidate[];
candidatesCount?: number | null;

Check warning on line 40 in frontend/src/components/design-system/containers/ElectionCardComponent.vue

View workflow job for this annotation

GitHub Actions / Build, test & lint

Prop 'candidatesCount' requires default value to be set
electionName?: string | null;

Check warning on line 41 in frontend/src/components/design-system/containers/ElectionCardComponent.vue

View workflow job for this annotation

GitHub Actions / Build, test & lint

Prop 'electionName' requires default value to be set
electionDateFrom?: string | null;
electionDateTo?: string | null;
updated?: string | null;
district?: string | null;

Check warning on line 45 in frontend/src/components/design-system/containers/ElectionCardComponent.vue

View workflow job for this annotation

GitHub Actions / Build, test & lint

Prop 'district' requires default value to be set
election?: string | null;

Check warning on line 46 in frontend/src/components/design-system/containers/ElectionCardComponent.vue

View workflow job for this annotation

GitHub Actions / Build, test & lint

Prop 'election' requires default value to be set
uuid?: string | null;

Check warning on line 47 in frontend/src/components/design-system/containers/ElectionCardComponent.vue

View workflow job for this annotation

GitHub Actions / Build, test & lint

Prop 'uuid' requires default value to be set
}

const props = withDefaults(defineProps<Props>(), {
Expand Down Expand Up @@ -135,7 +135,7 @@
<StackComponent spacing="medium">
<StackComponent spacing="extra-small">
<TitleText tag="h4" size="small">{{ electionName }}</TitleText>
<BodyText size="small" v-if="electionDateFrom && electionDateTo">
<BodyText v-if="electionDateFrom && electionDateTo" size="small">
{{ getDurationDate(electionDateFrom, electionDateTo) }}
</BodyText>
</StackComponent>
Expand All @@ -151,8 +151,8 @@
class="full-width"
>
<AvatarComponent
:backgroundImage="candidate.image"
:backgroundColor="
:background-image="candidate.image"
:background-color="
idx == 0
? 'rgb(var(--color-primary-bg-strong))'
: 'rgb(var(--color-primary-bg))'
Expand Down Expand Up @@ -248,7 +248,7 @@
padding="medium"
border
corner="bottom-left"
borderRadius="medium"
border-radius="medium"
class="full-width"
>
<StackComponent horizontal spacing="medium" centered>
Expand Down Expand Up @@ -313,7 +313,7 @@
padding="medium"
border
corner="bottom-left"
borderRadius="medium"
border-radius="medium"
class="full-width"
>
<StackComponent horizontal spacing="medium" centered>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/comparison/ComparisonGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export interface Source {
answer.candidate_id === candidateId &&
answer.question_id === question.id,
)[0]?.sources as Source[]"
v-bind:key="source.url"
:key="source.url"
>
<li>
<a :href="source.url">{{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/profile/AuthPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const { t } = useI18n();
$t('routes.profile.AuthPageVue.log-in')
}}</template>
</TitleText>
<BodyText strong size="small" v-if="type === 'registration'">
<BodyText v-if="type === 'registration'" strong size="small">
{{ $t('routes.profile.AuthPageVue.opinion') }}
</BodyText>
</StackComponent>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/profile/EmailAuthPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@ const handleSubmit = async () => {
>
<StackComponent spacing="medium" centered stretched>
<TextInputComponent
v-model="emailAddress"
required
label="E-mail"
type="email"
placeholder="E-mail"
:value="emailAddress"
v-model="emailAddress"
:icon="mdiEmailOutline"
:disabled="posting"
/>

<ButtonComponent
kind="filled"
color="primary"
@click.prevent="handleSubmit"
:loading="posting"
@click.prevent="handleSubmit"
>
{{ $t('routes.profile.EmailAuthPageVue.confirmation') }}
<template #iconAfter>
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/routes/profile/EmailFormPageVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const handleSubmit = async () => {
</ResponsiveWrapper>
</template>

<NavigationBar transparent :with-logo="false" v-if="step === 1">
<NavigationBar v-if="step === 1" transparent :with-logo="false">
<template #right>
<IconButton kind="link" @click="handleClose">
<IconComponent
Expand All @@ -164,7 +164,7 @@ const handleSubmit = async () => {
</template>
<StaticContentLayout size="small">
<StackComponent spacing="medium" centered>
<TitleText tag="p" size="medium" v-if="step === 0">
<TitleText v-if="step === 0" tag="p" size="medium">
{{ texts[step][type].title }}
</TitleText>

Expand All @@ -176,31 +176,31 @@ const handleSubmit = async () => {
</TitleText>
</template>

<BodyText strong size="medium" v-if="step === 0">
<BodyText v-if="step === 0" strong size="medium">
{{ $t('routes.profile.EmailFormPageVue.notification') }}
</BodyText>

<BodyText size="medium" centered v-if="step === 1">
<BodyText v-if="step === 1" size="medium" centered>
{{ texts[step][type].info }}
<BodyText strong size="medium"> {{ emailAddress }} </BodyText>
</BodyText>

<BodyText tag="p" size="medium" centered v-if="step === 0">
<BodyText v-if="step === 0" tag="p" size="medium" centered>
{{ texts[step][type].info }}
</BodyText>

<BodyText tag="p" size="medium" centered v-if="step === 1">
<BodyText v-if="step === 1" tag="p" size="medium" centered>
{{ $t('routes.profile.EmailFormPageVue.about-spam') }}
</BodyText>

<FormComponent @submit.prevent="handleSubmit" v-if="step === 0">
<FormComponent v-if="step === 0" @submit.prevent="handleSubmit">
<TextInputComponent
v-model="emailAddress"
required
label="E-mail"
type="email"
placeholder="E-mail"
:value="emailAddress"
v-model="emailAddress"
:icon="mdiEmailOutline"
:disabled="posting"
:error="emailAddressError"
Expand All @@ -209,8 +209,8 @@ const handleSubmit = async () => {
<ButtonComponent
kind="filled"
color="primary"
@click.prevent="handleSubmit"
:loading="posting"
@click.prevent="handleSubmit"
>
{{ $t('routes.profile.EmailFormPageVue.send-confirm') }}
<template #iconAfter>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/routes/profile/ProfilePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ if (!userStore.user) router.push(appRoutes.login);
</ResponsiveWrapper>

<TimelineComponent style="margin-top: 2rem">
<TimelineItemComponent
v-for="(answer, idx) in answers"
v-bind:key="idx"
>
<TimelineItemComponent v-for="(answer, idx) in answers" :key="idx">
<ElectionCardWrapperComponent :answer="answer" />
</TimelineItemComponent>

Expand Down
14 changes: 7 additions & 7 deletions frontend/src/routes/profile/ProfileSettingsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ const handleLogout = async () => {
<StackComponent spacing="large" centered>
<FormComponent
class="w-full"
@submit.prevent="onSubmit"
:success="formSavedSuccess"
@submit.prevent="onSubmit"
>
<TextInputComponent
label="Celé jméno"
type="text"
placeholder="Jan Novák"
class="w-full"
:modelValue="user?.displayName"
:model-value="user?.displayName"
:icon="mdiAccountOutline"
@update:modelValue="
:error="validateInput(user?.displayName)"
@update:model-value="
(newVal) => {
if (user) user.displayName = newVal;
}
"
:error="validateInput(user?.displayName)"
/>

<TextInputComponent
Expand All @@ -147,9 +147,9 @@ const handleLogout = async () => {
type="email"
placeholder="E-mail"
class="w-full"
:modelValue="user?.email"
:model-value="user?.email"
:icon="mdiEmailOutline"
@update:modelValue="
@update:model-value="
(newVal) => {
if (user) user.email = newVal;
}
Expand Down Expand Up @@ -245,8 +245,8 @@ const handleLogout = async () => {
kind="filled"
size="medium"
color="primary"
@click.prevent="handleDeleteUserClick"
center
@click.prevent="handleDeleteUserClick"
>
{{
$t('routes.profile.ProfileSettingsPage.button-delete-profile')
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/result/ResultCandidateCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ const toggleClick = () => {
? candidate?.parties?.[0].name
: candidate?.name
}}</BodyText>
<BodyText size="medium" v-if="expert">
<BodyText v-if="expert" size="medium">
postoje z verejných zdrojov
</BodyText>
<!--
Expand Down
Loading