From ec6d8b217bd1b2d338c7e472a0652e55bbc49806 Mon Sep 17 00:00:00 2001 From: mauricebutler Date: Tue, 10 Feb 2015 11:16:46 +1000 Subject: [PATCH] replace util.puts with console.log - support for new node versions and io.js --- sublimelinter/modules/libs/jsengines/node.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sublimelinter/modules/libs/jsengines/node.js b/sublimelinter/modules/libs/jsengines/node.js index b969e64e..b440d4be 100644 --- a/sublimelinter/modules/libs/jsengines/node.js +++ b/sublimelinter/modules/libs/jsengines/node.js @@ -5,7 +5,6 @@ */ var _fs = require('fs'), - _util = require('util'), _path = require('path'), linterPath = process.argv[2].replace(/\/$/, '') + '/', _linter = require(linterPath + 'linter'); @@ -18,7 +17,7 @@ function run() { if (filename) { results = _linter.lint(_fs.readFileSync(filename, 'utf-8'), config, linterPath); - _util.puts(JSON.stringify(results)); + console.log(JSON.stringify(results)); } else { process.stdin.resume(); process.stdin.setEncoding('utf8'); @@ -29,7 +28,7 @@ function run() { process.stdin.on('end', function () { results = _linter.lint(code, config, linterPath); - _util.puts(JSON.stringify(results)); + console.log(JSON.stringify(results)); }); } }