Skip to content

Commit 223c37e

Browse files
committed
Remove unused code
1 parent d3e0504 commit 223c37e

19 files changed

Lines changed: 33 additions & 441 deletions

File tree

app/components/Compare/ComparisonGrid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { ModuleReplacement } from 'module-replacements'
33
4-
export interface ComparisonGridColumn {
4+
interface ComparisonGridColumn {
55
name: string
66
version?: string
77
/** Module replacement data for this package (if available) */

app/components/Package/ListControls.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-
export type SortOption = 'downloads' | 'updated' | 'name-asc' | 'name-desc'
2+
type SortOption = 'downloads' | 'updated' | 'name-asc' | 'name-desc'
33
44
const props = defineProps<{
55
/** Current search/filter text */

app/components/Select/Field.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const SELECT_FIELD_LABEL_SIZES = {
1919
2020
const model = defineModel<string | undefined>({ default: undefined })
2121
22-
export interface SelectFieldProps extends SelectBaseProps {
22+
interface SelectFieldProps extends SelectBaseProps {
2323
items: { label: string; value: string; disabled?: boolean }[]
2424
size?: keyof typeof SELECT_FIELD_SIZES
2525
selectAttrs?: Omit<SelectBaseProps, 'size' | 'id'> &

app/components/Tooltip/Announce.vue

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/components/UserCombobox.vue

Lines changed: 0 additions & 218 deletions
This file was deleted.

app/composables/npm/useAlgoliaSearch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function hitToSearchResult(hit: AlgoliaHit): NpmSearchResult {
107107
}
108108
}
109109

110-
export interface AlgoliaSearchOptions {
110+
interface AlgoliaSearchOptions {
111111
size?: number
112112
from?: number
113113
filters?: string
@@ -121,7 +121,7 @@ export interface AlgoliaMultiSearchChecks {
121121
checkPackage?: string
122122
}
123123

124-
export interface AlgoliaSearchWithSuggestionsResult {
124+
interface AlgoliaSearchWithSuggestionsResult {
125125
search: NpmSearchResponse
126126
orgExists: boolean
127127
userExists: boolean

app/composables/npm/useNpmSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { emptySearchResponse, metaToSearchResult } from './search-utils'
22

3-
export interface NpmSearchOptions {
3+
interface NpmSearchOptions {
44
size?: number
55
from?: number
66
}

app/composables/useVirtualInfiniteScroll.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface WindowVirtualizerHandle {
1111
) => void
1212
}
1313

14-
export interface UseVirtualInfiniteScrollOptions {
14+
interface UseVirtualInfiniteScrollOptions {
1515
/** Reference to the WindowVirtualizer component */
1616
listRef: Ref<WindowVirtualizerHandle | null>
1717
/** Current item count */

app/utils/atproto/likes.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@ import { FetchError } from 'ofetch'
22
import { handleAuthError } from '~/utils/atproto/helpers'
33
import type { PackageLikes } from '#shared/types/social'
44

5-
export type LikeResult = { success: true; data: PackageLikes } | { success: false; error: Error }
5+
type LikeResult = { success: true; data: PackageLikes } | { success: false; error: Error }
66

77
/**
88
* Like a package via the API
99
*/
10-
export async function likePackage(
11-
packageName: string,
12-
userHandle?: string | null,
13-
): Promise<LikeResult> {
10+
async function likePackage(packageName: string, userHandle?: string | null): Promise<LikeResult> {
1411
try {
1512
const result = await $fetch<PackageLikes>('/api/social/like', {
1613
method: 'POST',
@@ -28,10 +25,7 @@ export async function likePackage(
2825
/**
2926
* Unlike a package via the API
3027
*/
31-
export async function unlikePackage(
32-
packageName: string,
33-
userHandle?: string | null,
34-
): Promise<LikeResult> {
28+
async function unlikePackage(packageName: string, userHandle?: string | null): Promise<LikeResult> {
3529
try {
3630
const result = await $fetch<PackageLikes>('/api/social/like', {
3731
method: 'DELETE',

app/utils/atproto/profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FetchError } from 'ofetch'
22
import { handleAuthError } from './helpers'
33

4-
export type UpdateProfileResult = {
4+
type UpdateProfileResult = {
55
success: boolean
66
error?: Error
77
}

0 commit comments

Comments
 (0)