Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 3, 2022
1 parent 8c44925 commit 6572255
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 82 deletions.
1 change: 1 addition & 0 deletions docs/src/components/Contributors.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { contributors } from '../contributors'
</script>

<template>
<div flex="~ wrap gap-1" justify-center>
<a v-for="{ name, avatar } of contributors" :key="name" :href="`https://github.com/${name}`" m-0 rel="noopener noreferrer" :aria-label="`${name} on GitHub`">
Expand Down
1 change: 1 addition & 0 deletions docs/src/components/Home.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { coreTeamMembers } from '../contributors'
</script>

<template>
<div flex flex-col items-center>
<div flex flex-col items-center p="t-10 md:t-20 b-10">
Expand Down
3 changes: 1 addition & 2 deletions examples/vitesse/src/components/Hello.vue
@@ -1,7 +1,6 @@
<script setup lang="ts">
const times = ref(2)
const props = defineProps<{ count: number }>()
const times = ref(2)
const result = computed(() => props.count * times.value)
defineExpose(props)
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/components/Hello.vue
@@ -1,9 +1,9 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
const times = ref(2)
const props = defineProps<{ count: number }>()
const times = ref(2)
const result = computed(() => props.count * times.value)
defineExpose(props)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -29,7 +29,7 @@
"ui:test": "npm -C packages/ui run test:run"
},
"devDependencies": {
"@antfu/eslint-config": "^0.22.0",
"@antfu/eslint-config": "^0.23.0",
"@antfu/ni": "^0.16.2",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^22.0.0",
Expand Down
11 changes: 6 additions & 5 deletions packages/ui/client/components/CodeMirror.vue
Expand Up @@ -2,17 +2,18 @@
import type CodeMirror from 'codemirror'
import { useCodeMirror } from '../composables/codemirror'
const attrs = useAttrs()
const emit = defineEmits<{
(event: 'update:modelValue', value: string): void
(event: 'save', content: string): void
}>()
const props = defineProps<{
modelValue: string
mode?: string
readOnly?: boolean
}>()
const emit = defineEmits<{
(event: 'update:modelValue', value: string): void
(event: 'save', content: string): void
}>()
const attrs = useAttrs()
const modeMap: Record<string, any> = {
// html: 'htmlmixed',
// vue: 'htmlmixed',
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/client/components/ConnectionOverlay.vue
Expand Up @@ -18,7 +18,7 @@ import { client, isConnected, isConnecting } from '~/composables/client'

flex="~ col gap-2"
items-center justify-center
:class="isConnecting ? 'animate-pulse': ''"
:class="isConnecting ? 'animate-pulse' : ''"
>
<div
text="5xl"
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/client/components/FileDetails.vue
Expand Up @@ -76,7 +76,7 @@ function onDraft(value: boolean) {
:class="{ 'tab-button-active': viewMode === 'editor' }"
@click="changeViewMode('editor')"
>
{{ draft ? '*&#160;': '' }}Code
{{ draft ? '*&#160;' : '' }}Code
</button>
<button
tab-button
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/client/components/Modal.vue
Expand Up @@ -45,17 +45,17 @@ const transform = computed(() => {
<template>
<div
class="fixed inset-0 z-40"
:class="modelValue ? '': 'pointer-events-none'"
:class="modelValue ? '' : 'pointer-events-none'"
>
<div
class="bg-base inset-0 absolute transition-opacity duration-500 ease-out"
:class="modelValue ? 'opacity-50': 'opacity-0'"
:class="modelValue ? 'opacity-50' : 'opacity-0'"
@click="$emit('update:modelValue', false)"
/>
<div
class="bg-base border-base absolute transition-all duration-200 ease-out"
:class="[positionClass, 'scrolls']"
:style="modelValue ? {}: {transform}"
class="bg-base border-base absolute transition-all duration-200 ease-out scrolls"
:class="[positionClass]"
:style="modelValue ? {} : { transform }"
>
<slot />
</div>
Expand Down
1 change: 0 additions & 1 deletion packages/ui/client/components/Navigation.vue
Expand Up @@ -16,7 +16,6 @@ function onItemClick(task: Task) {
showDashboard(false)
}
const toggleMode = computed(() => isDark.value ? 'light' : 'dark')
</script>

<template>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/client/components/TaskTree.vue
Expand Up @@ -22,12 +22,12 @@ export default {

<template>
<!-- maybe provide a KEEP STRUCTURE mode, do not filter by search keyword -->
<!-- v-if = keepStructure || (!search || caseInsensitiveMatch(task.name, search))-->
<!-- v-if = keepStructure || (!search || caseInsensitiveMatch(task.name, search)) -->
<TaskItem
v-if="!search || caseInsensitiveMatch(task.name, search)"
v-bind="$attrs"
:task="task"
:style="{ paddingLeft: `${indent * 0.75 + 1}rem`}"
:style="{ paddingLeft: `${indent * 0.75 + 1}rem` }"
@click="onItemClick && onItemClick(task)"
/>
<div v-if="nested && task.type === 'suite' && task.tasks.length">
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/client/components/TasksList.vue
Expand Up @@ -186,7 +186,7 @@ export default {
</DetailsPanel>
</template>

<!--flat-->
<!-- flat -->
<template v-else>
<TaskTree
v-for="task in filtered"
Expand All @@ -198,7 +198,7 @@ export default {
:on-item-click="onItemClick"
/>
</template>
<!--empty-state-->
<!-- empty-state -->
<template v-if="isFiltered && filtered.length === 0">
<div flex="~ col" items-center p="x4 y4" font-light>
<div op30>
Expand Down
Expand Up @@ -12,13 +12,13 @@ const props = defineProps<{
function formatTime(t: number) {
return (new Date(t)).toLocaleTimeString()
}
</script>

<template>
<div border="b base" p-4>
<div
text-xs mb-1
:class="props.type === 'stderr' ? 'text-red-600 dark:text-red-300': 'op30'"
:class="props.type === 'stderr' ? 'text-red-600 dark:text-red-300' : 'op30'"
>
{{ formatTime(props.time) }} | {{ props.taskName }} | {{ props.type }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/client/components/views/ViewReport.vue
Expand Up @@ -98,7 +98,7 @@ function relative(p: string) {
p="x3 y2"
m-2
rounded
:style="{ 'margin-left': `${task.result?.htmlError ? 0.5 : (2 * task.level + 0.5)}rem`}"
:style="{ 'margin-left': `${task.result?.htmlError ? 0.5 : (2 * task.level + 0.5)}rem` }"
>
{{ task.name }}
<div v-if="task.result?.htmlError" class="scrolls scrolls-rounded task-error">
Expand Down

0 comments on commit 6572255

Please sign in to comment.