Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
utils: [Fix] report the error stack on a resolution error #599
Resolve errors are most likely caused by invalid configuration, and the reason is easier to determine with the full details rather than just
With this change, it reports something like:
Fixes #536. Resolve errors are most likely caused by invalid configuration, and the reason is easier to determine with the full details rather than just `err.message`. With this change, it reports something like: ``` import/no-unresolved: Resolve error: SyntaxError: Unexpected token import at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:387:25) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (internal/module.js:16:19) at module.exports (/__censored__/webpack/configFactory.js:216:3) at configProdClient (/__censored__/webpack/configProdClient.js:5:36) at Object.<anonymous> (/__censored__/webpack/configForEslintImportResolver.js:1:126) ```
I think the stack for this specific error is meaningful at the exact place where the error has occurred, to be able to quickly fix the error without switching context.
I use Atom Linter, so I expect all the error details in the linter error message which editor shows me.
We could also log the error, but the core benefit is being able to see its cause quickly.
1 similar comment