From 95ff72b722e5ffacf62e17765f6469046741b9d9 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 26 Aug 2017 09:37:32 -0500 Subject: [PATCH] Make linter config JSON more readable --- edit/lint.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit/lint.js b/edit/lint.js index 141c954a..e7d3d492 100644 --- a/edit/lint.js +++ b/edit/lint.js @@ -279,7 +279,8 @@ function checkRules(linter, rules) { } function stringifyRules(rules) { - return JSON.stringify(rules, null, 2); + return JSON.stringify(rules, null, 2) + .replace(/,\n\s+\{\n\s+("severity":\s"\w+")\n\s+\}/g, ', {$1}'); } function setupLinterSettingsEvents(popup) {