Skip to content

Commit deb737a

Browse files
committed
chore: enable noUnusedLocals in tsconfig
1 parent 368e2d0 commit deb737a

11 files changed

Lines changed: 14 additions & 59 deletions

app/components/ClaimPackageModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function handleClaim() {
5959
6060
// Auto-approve and execute
6161
await approveOperation(operation.id)
62-
const result = await executeOperations()
62+
await executeOperations()
6363
6464
// Refresh state and check if operation completed successfully
6565
await refreshState()

app/components/ConnectorModal.vue

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,6 @@ function handleDisconnect() {
2424
disconnect()
2525
}
2626
27-
function copyCommand() {
28-
let command = executeNpmxConnectorCommand.value
29-
if (portInput.value !== '31415') {
30-
command += ` --port ${portInput.value}`
31-
}
32-
copy(command)
33-
}
34-
35-
const selectedPM = useSelectedPackageManager()
36-
37-
const executeNpmxConnectorCommand = computed(() => {
38-
return getExecuteCommand({
39-
packageName: 'npmx-connector',
40-
packageManager: selectedPM.value,
41-
})
42-
})
43-
4427
// Reset form when modal opens
4528
watch(open, isOpen => {
4629
if (isOpen) {

app/components/PackageDownloadAnalytics.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import { ref, computed, shallowRef, watch } from 'vue'
32
import type { VueUiXyDatasetItem } from 'vue-data-ui'
43
import { VueUiXy } from 'vue-data-ui/vue-ui-xy'
54
import { useDebounceFn, useElementSize } from '@vueuse/core'

app/components/PackageWeeklyDownloadStats.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import { ref, computed, onMounted, watch } from 'vue'
32
import { VueUiSparkline } from 'vue-data-ui/vue-ui-sparkline'
43
import { useCssVariables } from '../composables/useColors'
54
import { OKLCH_NEUTRAL_FALLBACK, lightenOklch } from '../utils/colors'

app/components/PaginationControls.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const effectiveMode = computed<PaginationMode>(() =>
2222
2323
// When 'all' is selected, there's only 1 page with everything
2424
const isShowingAll = computed(() => pageSize.value === 'all')
25-
const effectivePageSize = computed(() => (isShowingAll.value ? props.totalItems : pageSize.value))
2625
const totalPages = computed(() =>
2726
isShowingAll.value ? 1 : Math.ceil(props.totalItems / (pageSize.value as number)),
2827
)

app/components/VersionSelector.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { onClickOutside } from '@vueuse/core'
44
import { compare } from 'semver'
55
import {
66
buildVersionToTagsMap,
7-
parseVersion,
87
getPrereleaseChannel,
98
getVersionGroupKey,
109
getVersionGroupLabel,
@@ -511,7 +510,7 @@ watch(
511510
@keydown="handleListboxKeydown"
512511
>
513512
<!-- Version groups -->
514-
<div v-for="(group, groupIndex) in versionGroups" :key="group.id">
513+
<div v-for="group in versionGroups" :key="group.id">
515514
<!-- Group header (primary version) -->
516515
<div
517516
:id="`version-${group.primaryVersion.version}`"
@@ -580,7 +579,7 @@ watch(
580579
v-if="group.isExpanded && group.versions.length > 1"
581580
class="ms-6 border-is border-border"
582581
>
583-
<template v-for="(v, vIndex) in group.versions.slice(1)" :key="v.version">
582+
<template v-for="v in group.versions.slice(1)" :key="v.version">
584583
<NuxtLink
585584
:id="`version-${v.version}`"
586585
:to="getVersionUrl(v.version)"

app/components/compare/FacetSelector.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22
import type { ComparisonFacet } from '#shared/types'
33
import { FACET_INFO, FACETS_BY_CATEGORY, CATEGORY_ORDER } from '#shared/types/comparison'
44
5-
const {
6-
isFacetSelected,
7-
toggleFacet,
8-
selectCategory,
9-
deselectCategory,
10-
selectAll,
11-
deselectAll,
12-
isAllSelected,
13-
isNoneSelected,
14-
} = useFacetSelection()
5+
const { isFacetSelected, toggleFacet, selectCategory, deselectCategory } = useFacetSelection()
156
167
// Enrich facets with their info for rendering
178
const facetsByCategory = computed(() => {

app/pages/@[org].vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,6 @@ function handleClearFilter(chip: FilterChip) {
113113
clearFilter(chip)
114114
}
115115
116-
// Handle sort change from table
117-
function handleSortChange(option: SortOption) {
118-
setSort(option)
119-
}
120-
121116
const activeTab = shallowRef<'members' | 'teams'>('members')
122117
123118
// Canonical URL for this org page

app/pages/compare.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { FACET_INFO, type ComparisonFacet } from '#shared/types/comparison'
2+
import { FACET_INFO } from '#shared/types/comparison'
33
import { useRouteQuery } from '@vueuse/router'
44
55
definePageMeta({

app/pages/search.vue

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import type { FilterChip, SortOption } from '#shared/types/preferences'
2+
import type { FilterChip } from '#shared/types/preferences'
33
import { onKeyDown } from '@vueuse/core'
44
import { debounce } from 'perfect-debounce'
55
import { isValidNewPackageName, checkPackageExists } from '~/utils/package-name'
@@ -31,8 +31,6 @@ const updateUrlPage = debounce((page: number) => {
3131
// The actual search query (from URL, used for API calls)
3232
const query = computed(() => (route.query.q as string) ?? '')
3333
34-
const packageListRef = useTemplateRef('packageListRef')
35-
3634
// Track if page just loaded (for hiding "Searching..." during view transition)
3735
const hasInteracted = shallowRef(false)
3836
onMounted(() => {
@@ -91,10 +89,6 @@ watch(
9189
},
9290
)
9391
94-
const resultsMatchQuery = computed(() => {
95-
return previousQuery.value === query.value
96-
})
97-
9892
// Results to display (directly from incremental search)
9993
const rawVisibleResults = computed(() => results.value)
10094
@@ -158,7 +152,6 @@ const {
158152
toggleKeyword,
159153
clearFilter,
160154
clearAllFilters,
161-
setSort,
162155
} = useStructuredFilters({
163156
packages: resultsArray,
164157
initialSort: 'relevance-desc', // Default to search relevance
@@ -182,11 +175,6 @@ function handleClearFilter(chip: FilterChip) {
182175
clearFilter(chip)
183176
}
184177
185-
// Handle sort change from table
186-
function handleSortChange(option: SortOption) {
187-
setSort(option)
188-
}
189-
190178
// Should we show the loading spinner?
191179
const showSearching = computed(() => {
192180
// Don't show during initial page load (view transition)
@@ -195,11 +183,6 @@ const showSearching = computed(() => {
195183
return status.value === 'pending' && displayResults.value.length === 0
196184
})
197185
198-
const totalPages = computed(() => {
199-
if (!visibleResults.value) return 0
200-
return Math.ceil(visibleResults.value.total / pageSize)
201-
})
202-
203186
// Load more when triggered by infinite scroll
204187
async function loadMore() {
205188
if (isLoadingMore.value || !hasMore.value) return
@@ -757,7 +740,6 @@ defineOgImageComponent('Default', {
757740

758741
<PackageList
759742
v-if="displayResults.length > 0"
760-
ref="packageListRef"
761743
:results="displayResults"
762744
:search-query="query"
763745
heading-level="h2"

0 commit comments

Comments
 (0)