Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Hints are not visible with failOnHint == true #21

Open
xbill82 opened this issue Mar 21, 2016 · 2 comments
Open

Hints are not visible with failOnHint == true #21

xbill82 opened this issue Mar 21, 2016 · 2 comments
Assignees

Comments

@xbill82
Copy link

xbill82 commented Mar 21, 2016

Hi, thanks for the great package!

The failOnHint option is very handy for me, because it prevents people from shipping production builds with errors. Although, when the build fails due to a hint, I am unable to see the hint (not very convenient for solving the problem :)

10% 0/1 build modulesModuleBuildError: Module build failed: Error: Module failed in cause of jshint error.
    at Object.jsHint (/var/app/node_modules/jshint-loader/index.js:127:9)
    at Object.<anonymous> (/var/app/node_modules/jshint-loader/index.js:146:11)
    at /var/app/node_modules/jshint-loader/index.js:52:5
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
    at DependenciesBlock.onModuleBuildFailed (/var/app/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:315:19)
    at nextLoader (/var/app/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:270:31)
    at /var/app/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:292:15
    at context.callback (/var/app/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:148:14)
    at Object.<anonymous> (/var/app/node_modules/jshint-loader/index.js:149:11)
    at /var/app/node_modules/jshint-loader/index.js:52:5
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

Am I missing any config options?
Thanks!

@jvmccarthy
Copy link

Hi @xbill82. I'm trying to help maintain this loader.

You should see the warnings above the error in the webpack output with just the failOnHint option.

Are you using the webpack cli or a build wrapper to run webpack? If you're using gulp, for example, you can get the warnings from the stats parameter in the webpack compile callback.

I can look into what it would take to get the warning inside the error output as well, but you should be able to get the warnings for fixing them.

@jvmccarthy jvmccarthy self-assigned this Mar 22, 2016
@xbill82
Copy link
Author

xbill82 commented Mar 22, 2016

Hi @jvmccarthy thanks for the help (btw in the meanwhile I switched to ESLint, but it doesn't matter).
I actually use webpack CLI for my production build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants