From cd8369f68184d5f7d3eedc157ee5d9c00917c422 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sun, 6 Mar 2016 23:05:18 +0100 Subject: [PATCH] Add an empty line at the end of the rc file when writing to it --- .all-contributorsrc | 2 +- lib/configFile.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 5287317..0b94bd8 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -24,4 +24,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/lib/configFile.js b/lib/configFile.js index 1c9ca86..b7fd978 100644 --- a/lib/configFile.js +++ b/lib/configFile.js @@ -7,9 +7,10 @@ function formatCommaFirst(o) { return JSON.stringify(o, null, 2) .split(/(,\n\s+)/) .map(function (e, i) { - return i%2 ? '\n'+e.substring(4)+', ' : e + return i % 2 ? '\n' + e.substring(4) + ', ' : e }) - .join(''); + .join('') + + '\n'; } function readConfig(configPath) {