Skip to content

Commit

Permalink
chore: enforce vue/no-v-html rule
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 12, 2024
1 parent 47c88b9 commit b95197b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion components/EmptyCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ withDefaults(defineProps<{
<div class="flex flex-col items-center py-12">
<UIcon name="i-ph-magnifying-glass" class="w-16 h-16 mx-auto text-gray-500 dark:text-gray-400 mb-4" aria-hidden="true" />

<!-- eslint-disable-next-line vue/no-v-html -->
<p class="text-lg text-center max-w-sm">
{{ label }}
</p>
Expand Down
2 changes: 1 addition & 1 deletion components/content/ReadMore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const computedTitle = computed<string>(() => props.title || createBreadcrumb(pro
<template>
<Callout icon="i-ph-bookmark-simple" :to="to">
<MDCSlot unwrap="p">
Read more in <span class="font-bold" v-html="computedTitle" />.
Read more in <span class="font-bold" v-text="computedTitle" />.
</MDCSlot>
</Callout>
</template>
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import nuxt from './.nuxt/eslint.config.mjs'
export default nuxt()
.override('nuxt/vue/rules', {
rules: {
'vue/no-v-html': 'off',
'vue/no-v-html': 'error',
'vue/max-attributes-per-line': ['error', { singleline: 5, multiline: 1 }]
}
})
Expand Down
1 change: 1 addition & 0 deletions pages/enterprise/support.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ onBeforeUnmount(() => {
<UContainer>
<UPageHero :title="page.title" align="center" :links="page.hero.links">
<template #description>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="page.description" />
</template>
</UPageHero>
Expand Down

0 comments on commit b95197b

Please sign in to comment.