-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Make build fail on ESLint warnings if running CI #1162
Conversation
@@ -184,7 +184,9 @@ module.exports = { | |||
// TODO: consider separate config for production, | |||
// e.g. to enable no-console and no-debugger only in production. | |||
configFile: path.join(__dirname, '../.eslintrc'), | |||
useEslintrc: false | |||
useEslintrc: false, | |||
failOnWarning: !!process.env.CI, |
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.
We need to make sure this works after ejecting too.
So // @remove-on-eject-begin
needs to move inside eslint
config object.
Seems like all of this formatting is directly baked into webpack. The short message after I agree though, the stacktrace is pretty unfortunate in this case and can be confusing. |
It is, but we filter that in I don't mind dirty hacks as long as they're inside |
Well, we could dissect the error here and just pretty-print it. I'll have a better look at this later. |
I played around with it and indeed Closing this PR in favour of a better solution. |
( Related to previous pull request #944 and issue #1150 that followed. )
This pull request reverts behaviour in
build
script and moves the responsibility toeslint-loader
.As a bonus, this change makes the build fail almost immediately compared to previous solution.
cc @excitement-engineer