Skip to content

Commit ec66636

Browse files
lint again
1 parent 428b357 commit ec66636

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
useServerHead({
33
htmlAttrs: { lang: 'en-US' },
44
meta: [
5-
{ charset: 'UTF-8' },
5+
{ charset: 'utf8' },
66
{ property: 'og:type', content: 'website' },
77
{ property: 'og:url', content: 'https://directus.io/' },
88
],

components/Base/CheckboxGroup.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ const emit = defineEmits(['update:modelValue']);
2020
const updateValue = (value: string) => {
2121
const currentValue = props.modelValue || [];
2222
const index = currentValue.indexOf(value);
23-
let newValue;
24-
25-
newValue = index === -1 ? [...currentValue, value] : currentValue.filter((v) => v !== value);
23+
const newValue = index === -1 ? [...currentValue, value] : currentValue.filter((v) => v !== value);
2624
2725
emit('update:modelValue', newValue);
2826
};

components/Base/HsForm.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const { formId } = toRefs(props);
2424
const { $directus, $readSingleton, $posthog } = useNuxtApp();
2525
2626
declare global {
27-
// eslint-disable-next-line no-var
27+
/* eslint-disable-next-line no-var, vars-on-top */
2828
var hbspt: any;
2929
}
3030
@@ -74,6 +74,8 @@ function routeToMeetingLinkCallback(form: any, data: any) {
7474
}
7575
}
7676
77+
const generatedId = computed(() => `hs-form-${unref(formId)}${props.instanceId ? `-${props.instanceId}` : ''}`);
78+
7779
const renderHsForm = () => {
7880
window.hbspt?.forms.create({
7981
region: 'na1',
@@ -84,8 +86,6 @@ const renderHsForm = () => {
8486
});
8587
};
8688
87-
const generatedId = computed(() => `hs-form-${unref(formId)}${props.instanceId ? `-${props.instanceId}` : ''}`);
88-
8989
const { theme } = useTheme();
9090
9191
onLoaded(renderHsForm);

components/Base/TypeForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const props = withDefaults(defineProps<BaseHsFormProps>(), {
1616
const { formId } = toRefs(props);
1717
1818
const renderTypeForm = () => {
19-
// @ts-ignore -- Typeform is not typed
19+
// @ts-expect-error -- Typeform is not typed
2020
window.tf?.createWidget(unref(formId), {});
2121
};
2222

components/Block/Button.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const href = computed(() => {
3636
if (blockData?.resource?.slug && blockData?.resource?.type?.slug) {
3737
return `/${blockData.resource.type.slug}/${blockData.resource.slug}`;
3838
}
39+
40+
return null;
3941
});
4042
</script>
4143

components/Block/CardGroupDynamic.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ watch(activeTab, () => (page.value = 1));
3535
3636
watch(page, (newVal, oldVal) => {
3737
if (newVal !== oldVal) {
38-
document.getElementById(`block-${props.uuid}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
38+
document.querySelector(`#block-${props.uuid}`)?.scrollIntoView({ behavior: 'smooth', block: 'start' });
3939
router.replace({ query: { ...route.query, page: newVal } });
4040
}
4141
});
@@ -57,7 +57,7 @@ const { data: cards, pending } = await useAsyncData(
5757
async () => {
5858
const context = unref(block);
5959
60-
if (!context) throw undefined;
60+
if (!context) return [];
6161
6262
switch (context.collection) {
6363
case 'team': {
@@ -155,7 +155,7 @@ const { data: count } = await useAsyncData(
155155
() => {
156156
const context = unref(block);
157157
158-
if (!context) return Promise.reject();
158+
if (!context) return Promise.reject(new Error('No context'));
159159
160160
return $directus.request(
161161
$aggregate(context.collection, {

components/Block/Directory.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const { data: cards } = await useAsyncData(
2929
async () => {
3030
const context = unref(block);
3131
32-
if (!context) throw undefined;
32+
if (!context) return [];
3333
3434
const items = await $directus.request(
3535
$readItems(context.collection, {

components/LogoTicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const props = defineProps<{
1010

1111
<template>
1212
<div class="block-logocloud-ticker">
13-
<Vue3Marquee :clone="true" :duration="30">
13+
<Vue3Marquee clone :duration="30">
1414
<div class="logo-container">
1515
<BaseDirectusImage
1616
v-for="logo in props.logos"

components/ResourcePage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const related = computed(() => {
189189
<BaseVideo
190190
:url="resource.video.url ?? undefined"
191191
:uuid="(resource.video.file as string) ?? undefined"
192-
:controls="true"
192+
controls
193193
/>
194194
</div>
195195
</PageSection>

components/Tv/TVCategory.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ const leftLimit = ref(true);
1212
function determineScrollLimits() {
1313
const s = scroller.value;
1414
canScroll.value = s.clientWidth < s.scrollWidth;
15-
leftLimit.value = s.scrollLeft == 0;
16-
rightLimit.value = s.scrollWidth - Math.round(s.scrollLeft) == s.offsetWidth;
15+
leftLimit.value = s.scrollLeft === 0;
16+
rightLimit.value = s.scrollWidth - Math.round(s.scrollLeft) === s.offsetWidth;
1717
}
1818
1919
function scroll(val) {
2020
const showWidth = Number.parseInt(getComputedStyle(scroller.value.children[0]).getPropertyValue('width'));
2121
22-
if (val == 'right') {
22+
if (val === 'right') {
2323
scroller.value.scrollLeft += showWidth;
2424
}
2525
26-
if (val == 'left') {
26+
if (val === 'left') {
2727
scroller.value.scrollLeft -= showWidth;
2828
}
2929
}

0 commit comments

Comments
 (0)