Skip to content

Commit bd4ebe5

Browse files
[autofix.ci] apply automated fixes
1 parent fa52bff commit bd4ebe5

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

app/components/LicenseDisplay.vue

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
<script setup lang="ts">
2-
import { parseLicenseExpression } from "#shared/utils/spdx";
2+
import { parseLicenseExpression } from '#shared/utils/spdx'
33
4-
import { useLicenseChanges } from "~/composables/useLicenseChanges";
5-
import { useI18n } from "vue-i18n";
4+
import { useLicenseChanges } from '~/composables/useLicenseChanges'
5+
import { useI18n } from 'vue-i18n'
66
77
const props = defineProps<{
8-
license: string;
9-
packageName?: string;
10-
}>();
8+
license: string
9+
packageName?: string
10+
}>()
1111
12-
const { t } = useI18n();
12+
const { t } = useI18n()
1313
14-
const tokens = computed(() => parseLicenseExpression(props.license));
15-
const licenseChanges = useLicenseChanges(() => props.packageName);
14+
const tokens = computed(() => parseLicenseExpression(props.license))
15+
const licenseChanges = useLicenseChanges(() => props.packageName)
1616
17-
const changes = computed(() => licenseChanges.data.value?.changes ?? []);
17+
const changes = computed(() => licenseChanges.data.value?.changes ?? [])
1818
1919
const licenseChangeText = computed(() =>
2020
changes.value
21-
.map((item) =>
22-
t("package.versions.license_change_item", {
21+
.map(item =>
22+
t('package.versions.license_change_item', {
2323
from: item.from,
2424
to: item.to,
2525
version: item.version,
2626
}),
2727
)
28-
.join("; "),
29-
);
28+
.join('; '),
29+
)
3030
31-
const hasAnyValidLicense = computed(() =>
32-
tokens.value.some((t) => t.type === "license" && t.url),
33-
);
31+
const hasAnyValidLicense = computed(() => tokens.value.some(t => t.type === 'license' && t.url))
3432
</script>
3533

3634
<template>
@@ -47,9 +45,7 @@ const hasAnyValidLicense = computed(() =>
4745
{{ token.value }}
4846
</a>
4947
<span v-else-if="token.type === 'license'">{{ token.value }}</span>
50-
<span v-else-if="token.type === 'operator'" class="text-4xs">{{
51-
token.value
52-
}}</span>
48+
<span v-else-if="token.type === 'operator'" class="text-4xs">{{ token.value }}</span>
5349
</template>
5450
<span
5551
v-if="hasAnyValidLicense"

0 commit comments

Comments
 (0)