Skip to content

Commit

Permalink
Fix up lint errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Nov 1, 2023
1 parent a6820a1 commit 06f6c87
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/MigrationStatusSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { ProjectMigrationStatus } from '$lib/gql/generated/graphql';
import Select from './Select.svelte';
export let value: ProjectMigrationStatus | "UNMIGRATED" | undefined;
export let value: ProjectMigrationStatus | 'UNMIGRATED' | undefined;
export let error: string | string[] | undefined = undefined;
</script>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(authenticated)/admin/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
projectType: queryParam.string<ProjectType | undefined>(undefined),
userEmail: queryParam.string(undefined),
projectSearch: queryParam.string<string>(''),
migrationStatus: queryParam.string<ProjectMigrationStatus | "UNMIGRATED" | undefined>(undefined),
migrationStatus: queryParam.string<ProjectMigrationStatus | 'UNMIGRATED' | undefined>(undefined),
});
const { queryParamValues } = queryParams;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(authenticated)/admin/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type AdminSearchParams = {
projectType: ProjectType | undefined,
userEmail: string | undefined,
projectSearch: string,
migrationStatus: ProjectMigrationStatus | "UNMIGRATED" | undefined,
migrationStatus: ProjectMigrationStatus | 'UNMIGRATED' | undefined,
};

export type Project = LoadAdminDashboardProjectsQuery['projects'][number];
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/(authenticated)/admin/ProjectTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $: filters = queryParams.queryParamValues;
$: defaultFilters = queryParams.defaultQueryParamValues;
const projectFilterKeys = new Set(['projectSearch', 'projectType', 'migrationStatus', 'showDeletedProjects', 'userEmail'] as const) satisfies Set<keyof AdminSearchParams>;
function matchMigrationStatus(filter: string|undefined, status: string): boolean {
function matchMigrationStatus(filter: ProjectMigrationStatus | 'UNMIGRATED' | undefined, status: ProjectMigrationStatus): boolean {
return (!filter ||
filter === status ||
filter === 'UNMIGRATED' && (
Expand Down Expand Up @@ -74,7 +74,7 @@ async function softDeleteProject(project: Project): Promise<void> {
[ProjectMigrationStatus.PrivateRedmine]: 'i-mdi-checkbox-blank-circle-outline',
[ProjectMigrationStatus.PublicRedmine]: 'i-mdi-checkbox-blank-circle-outline',
} satisfies Record<ProjectMigrationStatus, string>;
function migrationStatusIcon(migrationStatus?: ProjectMigrationStatus) {
function migrationStatusIcon(migrationStatus?: ProjectMigrationStatus): string {
migrationStatus = migrationStatus ?? ProjectMigrationStatus.Unknown;
return migrationStatusTable[migrationStatus] ?? migrationStatusTable[ProjectMigrationStatus.Unknown];
}
Expand Down

0 comments on commit 06f6c87

Please sign in to comment.