From 4e54b5a077fb98ee614771b64fb77b331d8f2dfc Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 9 Sep 2022 09:30:51 +0200 Subject: [PATCH] [SM-204] Add the `curly` eslint rule (#3464) --- .eslintrc.json | 3 ++- apps/browser/src/content/message_handler.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 404abef39a..3a1c197326 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -64,6 +64,7 @@ "message": "Calling `svgIcon` directly is not allowed", "selector": "CallExpression[callee.name='svgIcon']" } - ] + ], + "curly": ["error", "all"] } } diff --git a/apps/browser/src/content/message_handler.ts b/apps/browser/src/content/message_handler.ts index 2e90038673..0f690bd4f7 100644 --- a/apps/browser/src/content/message_handler.ts +++ b/apps/browser/src/content/message_handler.ts @@ -1,7 +1,9 @@ window.addEventListener( "message", (event) => { - if (event.source !== window) return; + if (event.source !== window) { + return; + } if (event.data.command && event.data.command === "authResult") { chrome.runtime.sendMessage({