Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/components/ConfigItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ const extraConfigs = computed(() => {
</script>

<template>
<!-- @vue-ignore -->
<details
class="flat-config-item"
:open="open"
border="~ rounded-lg" relative
:class="active ? 'border-yellow:70' : 'border-base'"
@toggle="open = $event.target.open"
@toggle="open = ($event.target as any).open"
>
<summary block>
<div class="absolute right-[calc(100%+10px)] top-1.5" text-right font-mono op35 lt-lg:hidden>
Expand Down
2 changes: 1 addition & 1 deletion app/components/FileGroupItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function goToConfig(idx: number) {
<button
btn-action-sm
title="Copy"
@click="goToConfig(idx)"
@click="goToConfig(config.index)"
>
<div i-ph-stack-duotone />
Go to this config
Expand Down
15 changes: 11 additions & 4 deletions app/pages/configs.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import type { Linter } from 'eslint'
import type { FuseResultMatch } from 'fuse.js'
import type { PropType, VNode } from 'vue'
import type { ComponentPublicInstance, PropType, VNode } from 'vue'
import type { FlatConfigItem, MatchedFile } from '~~/shared/types'
import { useRoute } from '#app/composables/router'
import { debouncedWatch } from '@vueuse/core'
Expand All @@ -12,6 +12,14 @@ import { getRuleLevel } from '~~/shared/rules'
import { payload } from '~/composables/payload'
import { configsOpenState, filtersConfigs as filters, stateStorage } from '~/composables/state'

// TODO: fix the lint
// eslint-disable-next-line unimport/auto-insert
definePageMeta({
scrollToTop(to) {
return !('index' in to.query)
},
})

const input = ref(filters.filepath)

function expandAll() {
Expand Down Expand Up @@ -399,10 +407,9 @@ onMounted(async () => {
>
<ConfigItem
v-show="filteredConfigs.includes(config) && (!filters.filepath || (!stateStorage.showSpecificOnly || config.files))"
:ref="(el) => { configEls.set(idx, (el as any)?.$el) }"
:ref="(el) => { configEls.set(idx, (el as ComponentPublicInstance)?.$el) }"
v-model:open="configsOpenState[idx]"
:payload="payload"
:config="config"
:config
:index="idx"
:filters="filters"
:active="!!(filters.filepath && config.files)"
Expand Down