From f522c9ee0785defd5f1c652d7ff4ff9e61c78297 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 14 Sep 2021 08:54:22 -0700 Subject: [PATCH] Fix Flipper lints #3 Summary: More error chaining and some error logging. Reviewed By: lblasa Differential Revision: D30932120 fbshipit-source-id: de0da698a24b04312b4df3c59b02d8d85d2d7e19 --- desktop/app/src/fb-stubs/checkForUpdate.tsx | 2 ++ desktop/app/src/plugin.tsx | 1 + 2 files changed, 3 insertions(+) diff --git a/desktop/app/src/fb-stubs/checkForUpdate.tsx b/desktop/app/src/fb-stubs/checkForUpdate.tsx index b62f25f1c..d04305041 100644 --- a/desktop/app/src/fb-stubs/checkForUpdate.tsx +++ b/desktop/app/src/fb-stubs/checkForUpdate.tsx @@ -65,6 +65,8 @@ export async function checkForUpdate( console.log('Skipping version check on non-authenticated network.'); return {kind: 'up-to-date'}; } + // Good use of nesting. + // eslint-disable-next-line promise/no-nesting return res.json().then(parseResponse); default: const msg = `Server responded with ${res.statusText}.`; diff --git a/desktop/app/src/plugin.tsx b/desktop/app/src/plugin.tsx index 1737c330d..eb8e269df 100644 --- a/desktop/app/src/plugin.tsx +++ b/desktop/app/src/plugin.tsx @@ -285,6 +285,7 @@ export class FlipperPlugin< } get device() { + // eslint-disable-next-line node/no-sync return this.realClient.deviceSync; }