From 67e5f7528eeafb844c258cb431ca36382f264c85 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Wed, 31 Aug 2022 11:42:56 -0700 Subject: [PATCH] fix: indent with spaces (#31) --- script.js | 2 +- script.test.js | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/script.js b/script.js index b030169..7255a68 100644 --- a/script.js +++ b/script.js @@ -67,7 +67,7 @@ export async function script(octokit, repository, options) { renovateConfigObj.extends = newExtends; - return JSON.stringify(jsonFile, null, "\t"); + return JSON.stringify(jsonFile, null, " ") + "\n"; }, message: "build: renovate setup", }); diff --git a/script.test.js b/script.test.js index 3770e45..50478e6 100644 --- a/script.test.js +++ b/script.test.js @@ -98,19 +98,19 @@ test("preserves spacing for JSON files", async () => { equal( Buffer.from(body.content, "base64").toString(), "{\n" + - '\t"name": "octoherd-cli",\n' + - '\t"version": "0.0.0",\n' + - '\t"description": "",\n' + - '\t"main": "index.js",\n' + - '\t"scripts": {\n' + - '\t\t"test": "echo \\"Error: no test specified\\" && exit 1"\n' + - "\t},\n" + - '\t"author": "",\n' + - '\t"license": "ISC",\n' + - '\t"extends": [\n' + - '\t\t"github>octoherd/.github"\n' + - "\t]\n" + - "}" + ' "name": "octoherd-cli",\n' + + ' "version": "0.0.0",\n' + + ' "description": "",\n' + + ' "main": "index.js",\n' + + ' "scripts": {\n' + + ' "test": "echo \\"Error: no test specified\\" && exit 1"\n' + + " },\n" + + ' "author": "",\n' + + ' "license": "ISC",\n' + + ' "extends": [\n' + + ' "github>octoherd/.github"\n' + + " ]\n" + + "}\n" ); return true;