eslint-webpack-plugin
eslint-webpack-plugin copied to clipboard
failOnError is not working in development mode
Bug report
failOnError documentation is wrong. When there is an ESLint error, the build is failed but only in production mode. In development mode the build does not fail.
Actual Behavior
Build is not failing when mode is set to development.
Expected Behavior
The dist folder should not be generated in development mode or the docs should be updated.
How Do We Reproduce?
- Run
npm run buildin the project above. - As you can see there are ESLint errors but the
distfolder is still generated.
Please paste the results of npx webpack-cli info here, and mention other relevant information
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 10.31 GB / 15.91 GB
Binaries:
Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.4.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.76)
Internet Explorer: 11.0.19041.1202
Hi @Mikilll94 That's the goal, it just fails in production Probably the documentation is wrong Not sure if it's possible to stop compilation in development mode, is it @alexander-akait ?
It is possible, but expected, because build failed due warnings/errors only in production, you can change it using webpack config.
@alexander-akait can you provide anymore insight into what changes in the webpack config are needed to stop compilation on errors? I think this could be useful since it makes it obvious in development that you have an error
This is expected by webpack...
Any error thrown in development mode the build does not break
Closing as it is not a question related to this plugin