Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
69590775
Commit
69590775
authored
7 years ago
by
Dan Abramov
Committed by
GitHub
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Omit ESLint warnings when there are ESLint errors (#2120)
parent
8d4604eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/react-dev-utils/formatWebpackMessages.js
+13
-1
packages/react-dev-utils/formatWebpackMessages.js
with
13 additions
and
1 deletion
+13
-1
packages/react-dev-utils/formatWebpackMessages.js
+
13
-
1
View file @
69590775
...
@@ -84,7 +84,7 @@ function formatMessage(message, isError) {
...
@@ -84,7 +84,7 @@ function formatMessage(message, isError) {
"
$1 '$4' does not contain an export named '$3'.
"
"
$1 '$4' does not contain an export named '$3'.
"
);
);
}
}
// TODO: Ideally we should write a custom ESLint formatter instead.
// TODO: Ideally we should write a custom ESLint formatter instead.
// If the second line already includes a filename, and it's a warning,
// If the second line already includes a filename, and it's a warning,
...
@@ -122,6 +122,18 @@ function formatMessage(message, isError) {
...
@@ -122,6 +122,18 @@ function formatMessage(message, isError) {
return
true
;
return
true
;
});
});
var
ESLINT_WARNING_LABEL
=
String
.
fromCharCode
(
27
)
+
'
[33m
'
+
'
warning
'
+
String
.
fromCharCode
(
27
)
+
'
[39m
'
;
// If there were errors, omit any warnings.
if
(
isError
)
{
lines
=
lines
.
filter
(
function
(
line
)
{
return
line
.
indexOf
(
ESLINT_WARNING_LABEL
)
===
-
1
;
});
}
// Prepend filename with an explanation.
// Prepend filename with an explanation.
lines
[
0
]
=
lines
[
0
]
=
// Underline
// Underline
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment