From 9f8d78d9aeef6486715299eb838ff1b3d551139e Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Fri, 3 May 2019 16:53:00 -0700 Subject: [PATCH 1/2] Stop hiding the column number of ESLint errors --- packages/react-dev-utils/formatWebpackMessages.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/react-dev-utils/formatWebpackMessages.js b/packages/react-dev-utils/formatWebpackMessages.js index db9b2cb1971..97fc55cceef 100644 --- a/packages/react-dev-utils/formatWebpackMessages.js +++ b/packages/react-dev-utils/formatWebpackMessages.js @@ -41,9 +41,6 @@ function formatMessage(message) { /SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\n` ); - // Remove columns from ESLint formatter output (we added these for more - // accurate syntax errors) - message = message.replace(/Line (\d+):\d+:/g, 'Line $1:'); // Clean up export errors message = message.replace( /^.*export '(.+?)' was not found in '(.+?)'.*$/gm, From b849067cf35251e17f08bb89debf5a39969c607c Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Sat, 4 May 2019 09:26:03 -0700 Subject: [PATCH 2/2] update snapshots for tests --- .../__snapshots__/index.test.js.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap b/test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap index a70b43eff15..9d67e100720 100644 --- a/test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap +++ b/test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap @@ -62,7 +62,7 @@ Object { Failed to compile. ./src/App.js - Line 4: 'b' is not defined no-undef + Line 4:13: 'b' is not defined no-undef Search for the keywords to learn more about each error. @@ -79,7 +79,7 @@ Object { Compiled with warnings. ./src/App.js - Line 3: 'foo' is defined but never used no-unused-vars + Line 3:10: 'foo' is defined but never used no-unused-vars Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before.