Skip to content

Commit

Permalink
ci: add test workflow matching ecosystem-ci test + lint project
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 8, 2024
1 parent d99773c commit 71890eb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm nuxi prepare
- run: pnpm test
2 changes: 1 addition & 1 deletion components/content/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const props = defineProps({
title: { type: String },

Check warning on line 6 in components/content/Alert.vue

View workflow job for this annotation

GitHub Actions / lint

Prop 'title' requires default value to be set
icon: { type: String },

Check warning on line 7 in components/content/Alert.vue

View workflow job for this annotation

GitHub Actions / lint

Prop 'icon' requires default value to be set
color: { type: String as PropType<(typeof uiColors)[number]> },

Check warning on line 8 in components/content/Alert.vue

View workflow job for this annotation

GitHub Actions / lint

Prop 'color' requires default value to be set
to: { type: String },
to: { type: String }

Check warning on line 9 in components/content/Alert.vue

View workflow job for this annotation

GitHub Actions / lint

Prop 'to' requires default value to be set
})
const target = computed(() => (props.to?.startsWith('https://') ? '_blank' : ''))
Expand Down
12 changes: 7 additions & 5 deletions components/content/ReadMore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { splitByCase, upperFirst } from 'scule'
const props = defineProps({
to: {
type: String,
required: true,
required: true
},
title: {
type: String,
required: false,
default: '',
},
default: ''
}
})
const createBreadcrumb = (link: string = 'Missing link') => {
Expand All @@ -24,7 +24,7 @@ const createBreadcrumb = (link: string = 'Missing link') => {
.map((part) =>
splitByCase(part)
.map((p) => upperFirst(p))
.join(' '),
.join(' ')
)
.join(' > ')
.replace('Api', 'API')
Expand All @@ -35,6 +35,8 @@ const computedTitle = computed<string>(() => props.title || createBreadcrumb(pro

<template>
<Callout icon="i-ph-bookmark-simple-duotone" :to="to">
<MDCSlot unwrap="p"> Read more in <span class="font-bold" v-html="computedTitle" />. </MDCSlot>
<MDCSlot unwrap="p">
Read more in <span class="font-bold" v-html="computedTitle" />.

Check warning on line 39 in components/content/ReadMore.vue

View workflow job for this annotation

GitHub Actions / lint

'v-html' directive can lead to XSS attack
</MDCSlot>
</Callout>
</template>

0 comments on commit 71890eb

Please sign in to comment.