From 43cd62adb9bbc2e7688b9687ecd443891c8f4e62 Mon Sep 17 00:00:00 2001 From: mk-pmb Date: Mon, 11 Jul 2022 03:53:36 +0200 Subject: [PATCH] Fix #182 Warning: Accessing non-existent property 'runMain' Fixes #182. --- lib/nodelint.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/nodelint.js b/lib/nodelint.js index f4ee867..2e6701c 100644 --- a/lib/nodelint.js +++ b/lib/nodelint.js @@ -10,7 +10,11 @@ exports.LintStream = LintStream; exports.linter = linter; -exports.runMain = main.runMain; +exports.runMain = function proxy() { + // Proxying this fixes issue #182, "Warning: Accessing non-existent + // property 'runMain' of module exports inside circular dependency" + return main.runMain.call(null, arguments); +}; exports.setConsole = function (c) { 'use strict';