-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: better logging for errors in js config files (#935)
Before this change javascript config files that had compilation errors or that threw their own errors wouldn't report the error, making debugging a mite more difficult than it should be: instead you'd get a useless "TypeError: Cannot read property 'errors' of undefined" message. Now if the javascript config file tosses its cookies for whatever reason we can read what that reason was. Co-authored-by: Ricky Curtice <[email protected]>
- Loading branch information
Showing
3 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`lintStaged should catch errors from js function config 2`] = ` | ||
" | ||
ERROR Could not parse lint-staged config. | ||
Error: failed config | ||
ERROR | ||
ERROR Please make sure you have created it correctly. | ||
See https://github.com/okonet/lint-staged#configuration." | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters