From 0e17b5f8c6c2fd94b2b93acdf60765268ff9b7eb Mon Sep 17 00:00:00 2001 From: David Anson Date: Mon, 23 Jun 2025 05:20:51 +0000 Subject: [PATCH] Address new lint warnings from previous commit. --- demo/default.js | 2 +- lib/markdownlint.mjs | 4 ++-- lib/parse-configuration.mjs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/default.js b/demo/default.js index 8f68a027..03c042b1 100644 --- a/demo/default.js +++ b/demo/default.js @@ -79,7 +79,7 @@ }; try { return micromark.compile(compileOptions)(events); - } catch (error) { + } catch(error) { return `[Exception: "${error}"]`; } } diff --git a/lib/markdownlint.mjs b/lib/markdownlint.mjs index 46d3cb52..ecd18110 100644 --- a/lib/markdownlint.mjs +++ b/lib/markdownlint.mjs @@ -650,7 +650,7 @@ function lintContent( // Synchronous rule try { invokeRuleFunction(); - } catch (error) { + } catch(error) { if (handleRuleFailures) { catchCallsOnError(error); } else { @@ -721,7 +721,7 @@ function lintContent( } else { callbackSuccess(); } - } catch (error) { + } catch(error) { callbackError(error); } finally { cacheInitialize(); diff --git a/lib/parse-configuration.mjs b/lib/parse-configuration.mjs index 520a413b..a9e78c81 100644 --- a/lib/parse-configuration.mjs +++ b/lib/parse-configuration.mjs @@ -28,7 +28,7 @@ export default function parseConfiguration(name, content, parsers) { config = (result && (typeof result === "object") && !Array.isArray(result)) ? result : {}; // Succeeded return false; - } catch (error) { + } catch(error) { errors.push(`Parser ${index++}: ${error.message}`); } // Failed, try the next parser