From 1fa11271411eea8039bdc7596b7adae7c6aa5217 Mon Sep 17 00:00:00 2001 From: Nils Date: Sat, 30 Aug 2025 20:48:59 +0200 Subject: [PATCH] eslint --- eslint.config.js | 7 +++++++ meshcore-bot.js | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..b1afdc7 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,7 @@ +import js from "@eslint/js"; +import globals from "globals"; +import { defineConfig } from "eslint/config"; + +export default defineConfig([ + { files: ["**/*.{js,mjs,cjs}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } }, +]); diff --git a/meshcore-bot.js b/meshcore-bot.js index 5f26abd..5cb48c9 100644 --- a/meshcore-bot.js +++ b/meshcore-bot.js @@ -1,6 +1,7 @@ import { Constants, NodeJSSerialConnection } from "@liamcottle/meshcore.js"; // get port from cli arguments +/*eslint no-undef: "off"*/ const port = process.argv[2] || "/dev/cu.usbmodem1101"; console.log(`Connecting to ${port}`); @@ -33,11 +34,7 @@ connection.on("disconnected", () => { clearInterval(reconnectInterval); } reconnectInterval = setInterval(async () => { - try { - await connection.connect(); - } catch (e) { - // ignore, we will retry - } + await connection.connect(); }, 3000); });