From 3acbe2f744487898840a531a04992361d0581c53 Mon Sep 17 00:00:00 2001 From: David Marshall Date: Wed, 19 Apr 2023 22:30:52 -0400 Subject: [PATCH] linting --- src/core/operations/JSONToYAML.mjs | 4 ++-- src/core/operations/YAMLToJSON.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/operations/JSONToYAML.mjs b/src/core/operations/JSONToYAML.mjs index 9c9a596f..7f6e17f2 100644 --- a/src/core/operations/JSONToYAML.mjs +++ b/src/core/operations/JSONToYAML.mjs @@ -4,7 +4,7 @@ * @license Apache-2.0 */ -import YAML from 'yaml' +import YAML from "yaml"; import Operation from "../Operation.mjs"; import OperationError from "../errors/OperationError.mjs"; @@ -37,7 +37,7 @@ class JSONToYAML extends Operation { const doc = new YAML.Document(); try { doc.contents = JSON.parse(input.replace(/(\w+):/gm, `"$1":`)); - return doc.toString() + return doc.toString(); } catch (err) { throw new OperationError("Unable to parse JSON to YAML: " + err.toString()); } diff --git a/src/core/operations/YAMLToJSON.mjs b/src/core/operations/YAMLToJSON.mjs index c08c5418..341f66be 100644 --- a/src/core/operations/YAMLToJSON.mjs +++ b/src/core/operations/YAMLToJSON.mjs @@ -4,7 +4,7 @@ * @license Apache-2.0 */ -import YAML from 'yaml' +import YAML from "yaml"; import Operation from "../Operation.mjs"; import OperationError from "../errors/OperationError.mjs";