Skip to content

Commit

Permalink
Merge pull request #116 from HugoRCD/lint/115
Browse files Browse the repository at this point in the history
style: use personnal config
  • Loading branch information
HugoRCD authored Apr 18, 2024
2 parents 7a83fea + da535a5 commit 8d5f949
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 46 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ Made by [@HugoRCD](https://github.com/HugoRCD) and [community](https://github.co

---

_🤖 auto updated with [automd](https://automd.unjs.io) (last updated: Mon Apr 01 2024)_
_🤖 auto updated with [automd](https://automd.unjs.io) (last updated: Thu Apr 18 2024)_

<!-- /automd -->
2 changes: 1 addition & 1 deletion apps/app/components/DropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const items = [
<template>
<UDropdown
v-if="user"
:items="items"
:items
:ui="{
background: 'backdrop-blur-md border dark:bg-gray-950/50 dark:border-gray-400/10 bg-white',
ring: 'ring-1 ring-neutral-100 dark:ring-neutral-800',
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/OTP.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for (let i = 0; i < props.digitCount; i++) {
const emit = defineEmits(['otp:full'])
const isDigitsFull = function () {
const isDigitsFull = function() {
for (const elem of digits) {
if (elem) {
return false
Expand All @@ -29,7 +29,7 @@ const isDigitsFull = function () {
return true
}
const handleKeyDown = function (event: KeyboardEvent, index: number) {
const handleKeyDown = function(event: KeyboardEvent, index: number) {
if (!otpRef.value) return
if (event.key !== 'Tab' &&
event.key !== 'ArrowRight' &&
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/landing/Faq.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const items = [
color="primary"
variant="ghost"
size="sm"
:items="items"
:items
/>
</div>
</div>
Expand Down
11 changes: 7 additions & 4 deletions apps/app/components/landing/ScrambleText.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
<script setup>
<script setup lang="ts">
const props = defineProps({
label: String,
label: {
type: String,
required: true,
},
})
const displayText = ref(props.label)
const charset = 'abcdefghijklmnopqrstuvwxyz'
function randomChars(length) {
function randomChars(length: number) {
return Array.from(
{ length },
() => charset[Math.floor(Math.random() * charset.length)]
).join('')
}
async function scramble(input) {
async function scramble(input: string) {
let prefix = ''
for (let index = 0; index < input.length; index++) {
await new Promise((resolve) => setTimeout(resolve, 50))
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/landing/Sparkles.client.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script setup>
<script setup lang="ts">
import { tsParticles } from '@tsparticles/engine'
import { loadSlim } from '@tsparticles/slim'
import { onMounted, onUnmounted } from 'vue'
Expand Down Expand Up @@ -119,5 +119,5 @@ onUnmounted(() => {
</script>

<template>
<div :id="id" />
<div :id />
</template>
2 changes: 1 addition & 1 deletion apps/app/components/project/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function importProject() {
<div v-else class="flex flex-col gap-4">
<div v-if="teams.length !== 0" class="flex flex-col gap-4">
<div v-for="team in teams" :key="team.id" class="divide-y divide-gray-100 dark:divide-gray-800">
<ProjectTeamAssign :team="team" :project-id="0" is-emit @add-team="addTeam" />
<ProjectTeamAssign :team :project-id="0" is-emit @add-team="addTeam" />
</div>
</div>
<div v-else class="flex flex-col items-center justify-center gap-2">
Expand Down
5 changes: 2 additions & 3 deletions apps/app/components/project/CreateVariables.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ onMounted(() => {
e.preventDefault()
const pastedDataArray = pastedData.split('\n')
const pastedDataArrayFiltered = pastedDataArray.filter((data) => data !== '')
const pastedDataArrayFilteredLength = pastedDataArrayFiltered.length
variablesToCreate.value = pastedDataArrayFilteredLength
variablesToCreate.value = pastedDataArrayFiltered.length
variablesInput.value.variables = pastedDataArrayFiltered.map((data, index) => {
const [key, value] = data.split('=')
return {
Expand Down Expand Up @@ -115,7 +114,7 @@ onMounted(() => {
Manage your environment variables
</p>
</div>
<UDropdown :items="items">
<UDropdown :items>
<UButton color="gray" variant="ghost" icon="i-heroicons-ellipsis-horizontal-20-solid" />
</UDropdown>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/MainSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function getProjectManager(manager: string) {
</UCard>
</UModal>
</div>
<UDropdown v-if="project.ownerId === user?.id" :items="items">
<UDropdown v-if="project.ownerId === user?.id" :items>
<UButton color="gray" variant="ghost" icon="i-heroicons-ellipsis-horizontal-20-solid" />
</UDropdown>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/TeamAssign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function addTeamToProject(teamId: number) {
<UButton
color="primary"
class="text-xs"
:loading="loading"
:loading
label="Link"
icon="i-lucide-link"
@click="addTeamToProject(team.id)"
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/VarPrefix.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function addPrefixToInputId(prefix: string) {
<slot />
</div>

<UContextMenu v-model="isOpen" :virtual-element="virtualElement">
<UContextMenu v-model="isOpen" :virtual-element>
<UCard>
<template #header>
<h3 class="text-sm font-semibold">
Expand Down
2 changes: 1 addition & 1 deletion apps/app/components/project/VariableItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const items = [
<p class="hidden text-xs font-normal text-gray-500 md:block">
Last updated: {{ new Date(variable.updatedAt).toLocaleDateString() }}
</p>
<UDropdown :items="items">
<UDropdown :items>
<UButton color="gray" variant="ghost" icon="i-heroicons-ellipsis-horizontal-20-solid" />
</UDropdown>
</div>
Expand Down
28 changes: 14 additions & 14 deletions apps/app/components/setting/ThemeToggle.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
<template>
<ClientOnly>
<button
:class="[$colorMode.value === 'light' ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid', size]"
aria-label="Theme"
@click="startViewTransition($colorMode.value === 'light' ? 'dark' : 'light')"
/>
<template #fallback>
<div :class="size" />
</template>
</ClientOnly>
</template>

<script setup>
<script setup lang="ts">
defineProps({
size: {
type: String,
Expand Down Expand Up @@ -40,6 +27,19 @@ function startViewTransition(theme) {
}
</script>

<template>
<ClientOnly>
<button
:class="[$colorMode.value === 'light' ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid', size]"
aria-label="Theme"
@click="startViewTransition($colorMode.value === 'light' ? 'dark' : 'light')"
/>
<template #fallback>
<div :class="size" />
</template>
</ClientOnly>
</template>

<style>
/* Dark/Light reveal effect */
::view-transition-group(root) {
Expand Down
4 changes: 2 additions & 2 deletions apps/app/components/team/Members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function remove_member(teamId: number, memberId: number) {
<template>
<UAvatarGroup v-if="!display" :ui="{ ring: 'ring-0' }">
<UPopover v-for="member in members" :key="member.id" :popper="{ arrow: true }">
<TeamMember :member="member" />
<TeamMember :member />
<template #panel>
<UCard>
<form @submit.prevent="upsert_member(teamId, member.user.email, member.role)">
Expand Down Expand Up @@ -117,6 +117,6 @@ async function remove_member(teamId: number, memberId: number) {
</UPopover>
</UAvatarGroup>
<UAvatarGroup v-else :ui="{ ring: 'ring-0' }">
<TeamMember v-for="member in members" :key="member.id" :member="member" />
<TeamMember v-for="member in members" :key="member.id" :member />
</UAvatarGroup>
</template>
8 changes: 5 additions & 3 deletions apps/app/pages/app/project/[projectId]/index/variables.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<script setup lang="ts">
import type { Variable } from '@shelve/types'
const { projectId } = useRoute().params
const { data: variables, status, refresh } = useFetch(`/api/variable/project/${projectId}`, {
const { data: variables, status, refresh } = useFetch<Variable[]>(`/api/variable/project/${projectId}`, {
method: 'GET',
watch: false,
})
</script>

<template>
<div class="mt-6 flex flex-col gap-4">
<ProjectCreateVariables :variables :project-id="projectId" :refresh="refresh" />
<ProjectCreateVariables :variables :project-id :refresh />
<div v-if="status !== 'pending'" class="flex flex-col gap-4">
<div v-for="variable in variables" :key="variable.id">
<ProjectVariableItem :variables :project-id="projectId" :variable :refresh="refresh" />
<ProjectVariableItem :variables :project-id :variable :refresh />
</div>
</div>
<div v-else class="flex flex-col gap-4">
Expand Down
4 changes: 2 additions & 2 deletions apps/app/pages/app/teams.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ const items = (row: Team) => [
</div>
<div style="--stagger: 3" data-animate class="mt-6">
<UTable
:columns="columns"
:columns
:rows="filteredTeams"
:loading="loading"
:loading
:items-per-page="10"
>
<template #empty-state>
Expand Down
2 changes: 1 addition & 1 deletion apps/app/pages/roadmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const src = computed(() => `https://volta.net/embed/${token}?gray=${appConfig.ui
<template>
<div class="flex size-full items-center justify-center">
<ClientOnly>
<iframe :src="src" width="100%" height="100%" />
<iframe :src width="100%" height="100%" />
</ClientOnly>
</div>
</template>
4 changes: 1 addition & 3 deletions apps/app/server/middleware/2.serverAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import { Role } from '@shelve/types'
import { H3Event } from 'h3'

export default defineEventHandler((event: H3Event) => {
const protectedRoutes = [
'/api/admin'
]
const protectedRoutes = ['/api/admin']

const user = event.context.user

Expand Down
3 changes: 1 addition & 2 deletions apps/app/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ export default {
}
},
},
plugins: [
],
plugins: [],
} satisfies Config
Binary file modified bun.lockb
Binary file not shown.

0 comments on commit 8d5f949

Please sign in to comment.