From 279b4d57f1dddd62c2b2d533464bb26a19f90352 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Sun, 3 Apr 2022 00:43:28 +0100 Subject: [PATCH] Turn off formatOnSave and remove eslint.run & fix CalendarManager lint (#2357) --- .eslintignore | 2 -- .vscode/settings.json | 4 +--- packages/core/CalendarManager.ts | 16 ++++++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index f68ab303b2..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -packages/prisma/zod diff --git a/.vscode/settings.json b/.vscode/settings.json index b5e0d7593a..6502f7cf8c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,9 @@ { "typescript.tsdk": "node_modules/typescript/lib", - "editor.formatOnSave": true, - // Auto-fix issues with ESLint when you save code changes + "editor.formatOnSave": false, "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "eslint.run": "onSave", "typescript.preferences.importModuleSpecifier": "non-relative", "spellright.language": ["en"], "spellright.documentTypes": ["markdown"] diff --git a/packages/core/CalendarManager.ts b/packages/core/CalendarManager.ts index 8b6f544cdd..5d387429bc 100644 --- a/packages/core/CalendarManager.ts +++ b/packages/core/CalendarManager.ts @@ -109,10 +109,10 @@ export const createEvent = async (credential: Credential, calEvent: CalendarEven const creationResult = calendar ? await calendar.createEvent(calEvent).catch((e) => { - log.error("createEvent failed", e, calEvent); - success = false; - return undefined; - }) + log.error("createEvent failed", e, calEvent); + success = false; + return undefined; + }) : undefined; return { @@ -136,10 +136,10 @@ export const updateEvent = async ( const updatedResult = calendar && bookingRefUid ? await calendar.updateEvent(bookingRefUid, calEvent).catch((e) => { - log.error("updateEvent failed", e, calEvent); - success = false; - return undefined; - }) + log.error("updateEvent failed", e, calEvent); + success = false; + return undefined; + }) : undefined; return {