]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/init/config-file.js
import 8.3.0 source
[pve-eslint.git] / eslint / lib / init / config-file.js
index 4c648ac05517dfdd9e0c7ad25dafe619d6e7ac4d..9eb10fab3a403376c09ece81ee2a59d073b224a0 100644 (file)
@@ -23,9 +23,9 @@ const debug = require("debug")("eslint:config-file");
  * Determines sort order for object keys for json-stable-stringify
  *
  * see: https://github.com/samn/json-stable-stringify#cmp
- * @param   {Object} a The first comparison object ({key: akey, value: avalue})
- * @param   {Object} b The second comparison object ({key: bkey, value: bvalue})
- * @returns {number}   1 or -1, used in stringify cmp method
+ * @param {Object} a The first comparison object ({key: akey, value: avalue})
+ * @param {Object} b The second comparison object ({key: bkey, value: bvalue})
+ * @returns {number} 1 or -1, used in stringify cmp method
  */
 function sortByKey(a, b) {
     return a.key > b.key ? 1 : -1;
@@ -63,7 +63,7 @@ function writeYAMLConfigFile(config, filePath) {
     // lazy load YAML to improve performance when not used
     const yaml = require("js-yaml");
 
-    const content = yaml.safeDump(config, { sortKeys: true });
+    const content = yaml.dump(config, { sortKeys: true });
 
     fs.writeFileSync(filePath, content, "utf8");
 }