From bf5292fa6a3821bb7d0110152eb3772c7cd7cc9f Mon Sep 17 00:00:00 2001 From: Jordan Welch Date: Wed, 30 Oct 2024 21:10:01 -0500 Subject: [PATCH 1/4] newline between returns --- eslint.config.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 8d64924..218c537 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -11,5 +11,9 @@ export default [ 'no-restricted-imports': ['error', { patterns: ['.*'], // Disable all relative imports }], + '@stylistic/padding-line-between-statements': [ + 'error', + { blankLine: 'always', prev: '*', next: 'return' }, + ], }, }] From 423650ba04dbcc1a16ed498b797d993e7f3d79dc Mon Sep 17 00:00:00 2001 From: Jordan Welch Date: Wed, 30 Oct 2024 21:10:08 -0500 Subject: [PATCH 2/4] lint newlines --- .../__tests__/controllers/cacheEmailTemplatesController.spec.ts | 1 + server/src/controllers/cacheWeeksController.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/server/__tests__/controllers/cacheEmailTemplatesController.spec.ts b/server/__tests__/controllers/cacheEmailTemplatesController.spec.ts index 69430c0..a9228dc 100644 --- a/server/__tests__/controllers/cacheEmailTemplatesController.spec.ts +++ b/server/__tests__/controllers/cacheEmailTemplatesController.spec.ts @@ -23,6 +23,7 @@ let req: Request const newCacheController = () => { const config = mockConfig() const firestore = new FirestoreAdapter(config) + return new CacheEmailTemplatesController(firestore) } diff --git a/server/src/controllers/cacheWeeksController.ts b/server/src/controllers/cacheWeeksController.ts index 37384bb..2e5fa1c 100644 --- a/server/src/controllers/cacheWeeksController.ts +++ b/server/src/controllers/cacheWeeksController.ts @@ -50,6 +50,7 @@ export default class CacheWeeksController { res.status(200).json(dto) await this.firestore.setGlobal('lastUpdated', meta) + return } From 14402c5a16ac014c3244c23927e8631247bede30 Mon Sep 17 00:00:00 2001 From: Jordan Welch Date: Wed, 30 Oct 2024 21:20:59 -0500 Subject: [PATCH 3/4] Add member-delimiter-style --- eslint.config.mjs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 218c537..b15f644 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -15,5 +15,18 @@ export default [ 'error', { blankLine: 'always', prev: '*', next: 'return' }, ], + '@stylistic/member-delimiter-style': [ + 'error', + { + multiline: { + delimiter: 'none', + }, + singleline: { + delimiter: 'comma', + requireLast: false, + }, + multilineDetection: 'brackets', + }, + ], }, }] From ef98da0d1806aedf3e18d32acbd51aa45c028a2c Mon Sep 17 00:00:00 2001 From: Jordan Welch Date: Wed, 30 Oct 2024 21:22:47 -0500 Subject: [PATCH 4/4] Run linter, remove extraneous characters --- client/src/__tests__/test-extensions.d.ts | 2 +- client/src/components/DynamicHeroIcon.vue | 4 +- client/src/components/RsvpModal.vue | 6 +- client/src/components/form/FormCheckbox.vue | 6 +- client/src/components/form/FormInput.vue | 14 ++-- client/src/pages/SuggestionsCreatePage.vue | 8 +- client/src/types.ts | 6 +- .../controllers/rsvpController.spec.ts | 6 +- .../subscriptionController.spec.ts | 2 +- .../controllers/suggestionController.spec.ts | 6 +- server/__tests__/support/firebaseMock.ts | 64 +++++++-------- server/__tests__/support/notionHelpers.ts | 82 +++++++++---------- server/__tests__/support/notionMock.ts | 6 +- .../src/controllers/cacheWeeksController.ts | 8 +- server/src/controllers/weekController.ts | 6 +- server/src/data/firestore/firestoreAdapter.ts | 14 ++-- server/src/data/firestore/firestoreTypes.ts | 38 ++++----- server/src/data/tmdb/dtos/responseTypes.ts | 42 +++++----- server/src/helpers/validation.ts | 2 +- server/src/models/movie.ts | 22 ++--- server/src/models/week.ts | 16 ++-- server/src/types/weekProperties.ts | 4 +- shared/dtos.ts | 66 +++++++-------- 23 files changed, 215 insertions(+), 215 deletions(-) diff --git a/client/src/__tests__/test-extensions.d.ts b/client/src/__tests__/test-extensions.d.ts index 9ac46ea..cdc2515 100644 --- a/client/src/__tests__/test-extensions.d.ts +++ b/client/src/__tests__/test-extensions.d.ts @@ -3,7 +3,7 @@ import 'vitest' declare module '@vue/test-utils' { interface VueWrapper { - byTestId(id: string): DOMWrapper; + byTestId(id: string): DOMWrapper } } diff --git a/client/src/components/DynamicHeroIcon.vue b/client/src/components/DynamicHeroIcon.vue index 67a834b..adee9f7 100644 --- a/client/src/components/DynamicHeroIcon.vue +++ b/client/src/components/DynamicHeroIcon.vue @@ -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) diff --git a/client/src/components/RsvpModal.vue b/client/src/components/RsvpModal.vue index 5eae56b..413fb54 100644 --- a/client/src/components/RsvpModal.vue +++ b/client/src/components/RsvpModal.vue @@ -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({}) diff --git a/client/src/components/form/FormCheckbox.vue b/client/src/components/form/FormCheckbox.vue index 8f9b067..8c71d8b 100644 --- a/client/src/components/form/FormCheckbox.vue +++ b/client/src/components/form/FormCheckbox.vue @@ -2,9 +2,9 @@ import { computed } from 'vue' const props = defineProps<{ - name: string, - description: string, - label?: string, + name: string + description: string + label?: string }>() defineEmits([ diff --git a/client/src/components/form/FormInput.vue b/client/src/components/form/FormInput.vue index d618434..2395f3b 100644 --- a/client/src/components/form/FormInput.vue +++ b/client/src/components/form/FormInput.vue @@ -1,12 +1,12 @@