[mv3] Indent rulesets with fewer rules

This commit is contained in:
Raymond Hill 2024-02-14 15:48:59 -05:00
parent 88d9064a30
commit 8d47eac6e6
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -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(