From 8d47eac6e67b26d7de9a564709f55d68bc3ee43c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 14 Feb 2024 15:48:59 -0500 Subject: [PATCH] [mv3] Indent rulesets with fewer rules --- platform/mv3/salvage-ruleids.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/mv3/salvage-ruleids.mjs b/platform/mv3/salvage-ruleids.mjs index cfbfd7ab6..33e3d0910 100644 --- a/platform/mv3/salvage-ruleids.mjs +++ b/platform/mv3/salvage-ruleids.mjs @@ -89,9 +89,10 @@ async function main() { afterRule.id = ruleIdGenerator++; } afterRules.sort((a, b) => a.id - b.id); + const indent = afterRules.length > 10 ? undefined : 1; const lines = []; for ( const afterRule of afterRules ) { - lines.push(JSON.stringify(afterRule)); + lines.push(JSON.stringify(afterRule, null, indent)); } writePromises.push( fs.writeFile(