Catch ESLint lintFiles errors (fixes #96)
Hello!
Right now, if an ESLint rule throws an error, the error object includes a reference to the AST node where the error originated, which includes circular data structures. jest-runner-eslint doesn't do anything special for these errors.
If the tests are running in band, this is not an issue: Jest correctly shows the error to the user. However, if the test is running in a child process, the runner tries to send the circular data structure back to the main process, which produces the Converting circular structure to JSON error shown in #96.
This patch puts a try…catch around the call to lintFiles, so the error message can be reported to Jest explicitly, preventing the circular reference from being propagated.
@alunny hey there! sorry I missed this PR.
I merged in main and it seems tests are failing. Could you take a look? 🙂
Thanks @SimenB , looks like I needed to run Prettier again :)
@alunny sorry, missed your ping. triggered CI now - seems like there's still lots of failures 🙂
@alunny ping