-
-
Notifications
You must be signed in to change notification settings - Fork 53
fix: fails when failOnError or failOnWarning enabled
#72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #72 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 245 243 -2
Branches 66 65 -1
=========================================
- Hits 245 243 -2
Continue to review full report at Codecov.
|
alexander-akait
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do not set warnings and errors on empty array, when failOnError is disabled?
|
You're right! |
|
Hard to say, don't think there is a correct answer, everyone decides how best to set up, but for me default |
|
For me it makes more sense too, not to generate a breaking change |
|
It seems that Perhaps this code should be changed from: To if (warnings && !options.failOnWarning) {
// @ts-ignore
compilation.warnings.push(warnings);
} else if (warnings && options.failOnWarning) {
// @ts-ignore
compilation.errors.push(warnings);
}
if (errors && options.failOnError) {
// @ts-ignore
compilation.errors.push(errors);
} else if (errors && !options.failOnError) { // <-- added
// @ts-ignore
compilation.warnings.push(errors);
} |
|
Its intentional #72 (review) Please open a PR with this change if possible 😄 |
This PR contains a:
Motivation / Use-Case
Fix when
failOnErrororfailOnWarningis enabled and there is an error or warning from eslint locking the compilation and not displaying anything.Resolve #51, #21, #71
Breaking Changes
Additional Info