Skip to content

Commit 85aac9b

Browse files
justingrantianschmitz
authored andcommitted
Stop hiding the column number of ESLint errors (#6980)
1 parent 6980616 commit 85aac9b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/react-dev-utils/formatWebpackMessages.js

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ function formatMessage(message) {
4141
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
4242
`${friendlySyntaxErrorLabel} $3 ($1:$2)\n`
4343
);
44-
// Remove columns from ESLint formatter output (we added these for more
45-
// accurate syntax errors)
46-
message = message.replace(/Line (\d+):\d+:/g, 'Line $1:');
4744
// Clean up export errors
4845
message = message.replace(
4946
/^.*export '(.+?)' was not found in '(.+?)'.*$/gm,

test/fixtures/webpack-message-formatting/__snapshots__/index.test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Object {
6262
Failed to compile.
6363
6464
./src/App.js
65-
Line 4: 'b' is not defined no-undef
65+
Line 4:13: 'b' is not defined no-undef
6666
6767
Search for the keywords to learn more about each error.
6868
@@ -79,7 +79,7 @@ Object {
7979
Compiled with warnings.
8080
8181
./src/App.js
82-
Line 3: 'foo' is defined but never used no-unused-vars
82+
Line 3:10: 'foo' is defined but never used no-unused-vars
8383
8484
Search for the keywords to learn more about each warning.
8585
To ignore, add // eslint-disable-next-line to the line before.

0 commit comments

Comments
 (0)