Skip to content

Commit

Permalink
Run linter, remove extraneous characters
Browse files Browse the repository at this point in the history
  • Loading branch information
JHWelch committed Oct 31, 2024
1 parent 14402c5 commit ef98da0
Show file tree
Hide file tree
Showing 23 changed files with 215 additions and 215 deletions.
2 changes: 1 addition & 1 deletion client/src/__tests__/test-extensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'vitest'

declare module '@vue/test-utils' {
interface VueWrapper {
byTestId(id: string): DOMWrapper<Element>;
byTestId(id: string): DOMWrapper<Element>
}
}

Expand Down
4 changes: 2 additions & 2 deletions client/src/components/DynamicHeroIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { onMounted, ref } from 'vue'
import * as heroIcons from '@heroicons/vue/24/solid'
const props = defineProps<{
name: keyof typeof heroIcons,
class?: string,
name: keyof typeof heroIcons
class?: string
}>()
const isLoaded = ref(false)
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/RsvpModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { CalendarDaysIcon } from '@heroicons/vue/24/solid'
import { jsonHeaders } from '@client/data/headers'
type RsvpForm = {
name: string,
email?: string,
reminders: boolean,
name: string
email?: string
reminders: boolean
}
const errors = ref<Errors>({})
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/form/FormCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import { computed } from 'vue'
const props = defineProps<{
name: string,
description: string,
label?: string,
name: string
description: string
label?: string
}>()
defineEmits([
Expand Down
14 changes: 7 additions & 7 deletions client/src/components/form/FormInput.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts" setup>
withDefaults(defineProps<{
name: string,
hideLabel?: boolean,
label?: string,
type?: string,
error?: string,
placeholder?: string,
required?: boolean,
name: string
hideLabel?: boolean
label?: string
type?: string
error?: string
placeholder?: string
required?: boolean
}>(), {
hideLabel: false,
type: 'text',
Expand Down
8 changes: 4 additions & 4 deletions client/src/pages/SuggestionsCreatePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { ErrorBag } from '@client/types'
import { jsonHeaders } from '@client/data/headers'
type SuggestionFormData = {
theme?: string,
submitted_by?: string,
movie1?: string,
movie2?: string,
theme?: string
submitted_by?: string
movie1?: string
movie2?: string
}
const errors = ref<SuggestionFormData>({})
Expand Down
6 changes: 3 additions & 3 deletions client/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export type Errors = {
[key: string]: string;
[key: string]: string
}

export type ErrorBag = {
errors?: Errors;
message?: string;
errors?: Errors
message?: string
}
6 changes: 3 additions & 3 deletions server/__tests__/controllers/rsvpController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ const mockBody = ({
email = 'test@example.com',
reminders = false,
}: {
name?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
email?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
reminders?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
name?: any // eslint-disable-line @typescript-eslint/no-explicit-any
email?: any // eslint-disable-line @typescript-eslint/no-explicit-any
reminders?: any // eslint-disable-line @typescript-eslint/no-explicit-any
} = {}) => ({ name, email, reminders })

describe('store', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ beforeEach(() => {
})

interface MockBodyArgs {
email?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
email?: any // eslint-disable-line @typescript-eslint/no-explicit-any
}

const mockBody = ({
Expand Down
6 changes: 3 additions & 3 deletions server/__tests__/controllers/suggestionController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const newSuggestionController = () => {
}

interface MockBodyArgs {
theme?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
submitted_by?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
movies?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
theme?: any // eslint-disable-line @typescript-eslint/no-explicit-any
submitted_by?: any // eslint-disable-line @typescript-eslint/no-explicit-any
movies?: any // eslint-disable-line @typescript-eslint/no-explicit-any
}

const mockBody = ({
Expand Down
64 changes: 32 additions & 32 deletions server/__tests__/support/firebaseMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,52 +115,52 @@ export class FirebaseMock {
}).toFirebaseDTO()

static mockCollection = (collectionPath: string): {
firestore: { firestore: 'firestore' },
collectionPath: string,
firestore: { firestore: 'firestore' }
collectionPath: string
} => ({
firestore: { firestore: 'firestore' },
collectionPath,
})
}

export type FirebaseWeek = {
id: string,
theme: string,
date: DateTime,
slug?: string | null,
isSkipped: boolean,
movies?: FirebaseMovie[],
styledTheme?: RichText[],
lastEditedTime?: string,
id: string
theme: string
date: DateTime
slug?: string | null
isSkipped: boolean
movies?: FirebaseMovie[]
styledTheme?: RichText[]
lastEditedTime?: string
}

export type FirebaseMovie = {
director: string,
length: number,
notionId: string,
posterPath: string,
showingUrl: string | null,
theaterName: string | null,
time: string | null,
title: string,
tmdbId: number | null,
url: string | null,
year: number | null,
director: string
length: number
notionId: string
posterPath: string
showingUrl: string | null
theaterName: string | null
time: string | null
title: string
tmdbId: number | null
url: string | null
year: number | null
}

export type FirebaseUser = {
id: string,
email: string,
reminders: boolean,
id: string
email: string
reminders: boolean
}

export type FirebaseWeekConstructor = {
id: string,
theme: string,
date: Date|string,
styledTheme?: RichText[],
isSkipped?: boolean,
slug?: string | null,
movies?: Movie[],
lastEditedTime?: DateTime|string,
id: string
theme: string
date: Date|string
styledTheme?: RichText[]
isSkipped?: boolean
slug?: string | null
movies?: Movie[]
lastEditedTime?: DateTime|string
}
82 changes: 41 additions & 41 deletions server/__tests__/support/notionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ import {
import { Movie } from '@server/models/movie'

export const nCheckbox = (checked: boolean): {
type: 'checkbox';
checkbox: boolean;
id: string;
type: 'checkbox'
checkbox: boolean
id: string
} => ({
checkbox: checked,
type: 'checkbox',
id: 'mockedId',
})

export const nDate = (start: string): {
type: 'date';
type: 'date'
date: {
start: string,
end: null,
time_zone: null,
};
id: string;
start: string
end: null
time_zone: null
}
id: string
} => ({
type: 'date',
date: {
Expand All @@ -33,9 +33,9 @@ export const nDate = (start: string): {
})

export const nNumber = (number: number | null): {
type: 'number';
number: number | null;
id: string;
type: 'number'
number: number | null
id: string
} => ({
type: 'number',
number: number,
Expand All @@ -45,9 +45,9 @@ export const nNumber = (number: number | null): {
export const nRichText = (
text: string | RichTextItemResponse[] | null,
): {
type: 'rich_text';
rich_text: Array<RichTextItemResponse>;
id: string;
type: 'rich_text'
rich_text: Array<RichTextItemResponse>
id: string
} => ({
type: 'rich_text',
rich_text: Array.isArray(text)
Expand All @@ -57,9 +57,9 @@ export const nRichText = (
})

export const nTitle = (title: string): {
type: 'title';
title: Array<RichTextItemResponse>;
id: string;
type: 'title'
title: Array<RichTextItemResponse>
id: string
} => ({
type: 'title',
title: [richTextItem(title)],
Expand All @@ -85,31 +85,31 @@ export const richTextItem = (text: string): RichTextItemResponse => ({
})

export const nUrl = (url: string | null): {
type: 'url';
url: string | null;
id: string;
type: 'url'
url: string | null
id: string
} => ({
url,
type: 'url',
id: 'mockedId',
})

export const nRelation = (relation: NotionMovie[]): {
type: 'relation';
type: 'relation'
relation: {
id: string;
}[];
id: string;
id: string
}[]
id: string
} => ({
type: 'relation',
relation: relation.map(movie => movie.toPageObjectResponse()),
id: 'mockedId',
})

export const nLastEditedTime = (time: string): {
type: 'last_edited_time';
last_edited_time: string;
id: string;
type: 'last_edited_time'
last_edited_time: string
id: string
} => ({
type: 'last_edited_time',
last_edited_time: time,
Expand All @@ -124,12 +124,12 @@ export const nFormula = (result: string | null): {
}| {
type: 'date'
date: {
start: string;
start: string
end: string | null
time_zone: null
}
}
id: string;
id: string
} => result
? {
type: 'formula',
Expand Down Expand Up @@ -192,20 +192,20 @@ export type QueryBody = {
}

export type WithAuth<P> = P & {
auth?: string;
auth?: string
}

type NotionMovieConstructor = {
id: string,
title: string,
director?: string | null,
year?: number | null,
length?: number | null,
time?: string | null,
url?: string | null,
posterPath?: string | null,
theaterName?: string | null,
showingUrl?: string | null,
id: string
title: string
director?: string | null
year?: number | null
length?: number | null
time?: string | null
url?: string | null
posterPath?: string | null
theaterName?: string | null
showingUrl?: string | null
}

export class NotionMovie {
Expand Down
6 changes: 3 additions & 3 deletions server/__tests__/support/notionMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export class NotionMock {
}

static mockWeek = (week: {
id: string,
date: string,
theme: string,
id: string
date: string
theme: string
skipped?: boolean
slug?: string | null
movies?: NotionMovie[]
Expand Down
Loading

0 comments on commit ef98da0

Please sign in to comment.