From 7b2349dcd2fe1ce8636395dbbe1baa6b2b44c3be Mon Sep 17 00:00:00 2001 From: Lucas Azzola Date: Fri, 9 Feb 2018 21:31:48 +1100 Subject: [PATCH] Set os.EOL in worker.js (#3935) --- website/static/worker.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/static/worker.js b/website/static/worker.js index 3262ae131..77c08b67c 100644 --- a/website/static/worker.js +++ b/website/static/worker.js @@ -2,6 +2,7 @@ /* eslint no-var: off, strict: off */ // "Polyfills" in order for all the code to run +/* eslint-disable */ self.global = self; self.util = {}; self.path = {}; @@ -17,13 +18,12 @@ self.Buffer = { } }; self.constants = {}; -// eslint-disable-next-line module$1 = module = os = crypto = {}; self.fs = { readFile: function() {} }; -// eslint-disable-next-line no-undef os.homedir = function() { return "/home/prettier"; }; +os.EOL = '\n'; self.process = { argv: [], env: { PRETTIER_DEBUG: true }, @@ -56,6 +56,8 @@ self.require = function require(path) { return self[path]; }; +/* eslint-enable */ + var prettier; importScripts("lib/index.js"); if (typeof prettier === "undefined") {