Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelodelain committed May 14, 2024
1 parent 8ecfc2f commit bdc8755
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/atoms/VMarkdown/VMarkdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { marked } from 'marked'
import {getSlotChildrenText} from "~/utils/vue/get-slot-children-text";
import { getSlotChildrenText } from '~/utils/vue/get-slot-children-text'
const renderer = new marked.Renderer()
const linkRenderer = renderer.link
Expand Down
8 changes: 5 additions & 3 deletions components/molecules/VRoadizImage/VRoadizImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ export default defineComponent({
isPicture ? slots.default : undefined,
)
const copyright = computed(() =>
(typeof props.copyright === 'string' && props.copyright) ||
(props.copyright === true && document.value?.copyright))
const copyright = computed(
() =>
(typeof props.copyright === 'string' && props.copyright) ||
(props.copyright === true && document.value?.copyright),
)
return () => {
if (copyright.value) {
Expand Down
2 changes: 1 addition & 1 deletion utils/image/extract-intervention-request-modifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type InterventionRequestModifiers = Partial<typeof interventionRequestProps>

export function extractInterventionRequestModifiers(
source: Record<string, unknown>,
excludedKeys: string[] = ['width', 'height']
excludedKeys: string[] = ['width', 'height'],
) {
const interventionRequestKeys = Object.keys(interventionRequestProps)

Expand Down
14 changes: 8 additions & 6 deletions utils/vue/get-slot-children-text.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type {VNode, VNodeNormalizedChildren} from "@vue/runtime-core";
import type { VNode, VNodeNormalizedChildren } from 'vue'

Check warning on line 1 in utils/vue/get-slot-children-text.ts

View workflow job for this annotation

GitHub Actions / lint

'VNode' is defined but never used

export function getSlotChildrenText(children: VNodeNormalizedChildren) {
return children?.map(node => {
if (!node.children || typeof node.children === 'string') return node.children || ''
else if (Array.isArray(node.children)) return getSlotChildrenText(node.children)
else if (node.children.default) return getSlotChildrenText(node.children.default())
}).join('')
return children
?.map((node) => {
if (!node.children || typeof node.children === 'string') return node.children || ''
else if (Array.isArray(node.children)) return getSlotChildrenText(node.children)
else if (node.children.default) return getSlotChildrenText(node.children.default())
})
.join('')
}

0 comments on commit bdc8755

Please sign in to comment.