From 597b3d1941b09d20781b56c6f154cd39acb8dcb0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 24 Nov 2017 01:50:28 +0100 Subject: module: print better message on esm syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Include the offending line in the output and underline the bad token. Before this commit, it printed "SyntaxError: Unexpected reserved word" without indicating where the syntax error is. Now it prints the line and underlines the offending token, like it does for syntax errors in CJS scripts. Minor changes are made to the test runner in order to support `*.mjs` files in test/message. Fixes: https://github.com/nodejs/node/issues/17277 PR-URL: https://github.com/nodejs/node/pull/17281 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: Michaƫl Zasso --- .eslintignore | 1 + 1 file changed, 1 insertion(+) (limited to '.eslintignore') diff --git a/.eslintignore b/.eslintignore index 9b1d8b3f35..dc4e023866 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,6 +3,7 @@ lib/internal/v8_prof_polyfill.js lib/punycode.js test/addons/??_* test/fixtures +test/message/esm_display_syntax_error.mjs tools/eslint tools/icu tools/remark-* -- cgit v1.2.3