You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path) #3238
When CLIEngine is not available (e.g. ESLint 9), whitespace.js loads the config by running whitespace-async.js with execSync and then doing JSON.parse(String(...)) on the result. There is no try/catch around this.
Impact
If the child script exits non-zero, prints errors, or prints non-JSON (e.g. ESLint timing or debug output), execSync may throw or return non-JSON.
JSON.parse will then throw and the config load fails with a generic parsing error, making it hard to see that the real failure was in the child script.
I don't believe there's a released version of the config yet that works with eslint 9. However, unreleased code should, so a PR would be great.
Please be sure not to use an LLM to generate the code, since LLM-generated code is not copyrightable and thus can't be accepted to any open source project.
@ljharb Thanks for the clarification.
I’m sorry if my PR wasn’t clear, I may not have explained it well.
there is no code to generate using LLM. 😄
Let me try to clarify it better.
A catch callback will mask an error - if there's an error, things should crash. Instead, fix things for eslint 10 and continue to let errors crash.
One question - would you like me to implement it directly rather than just suggesting a fix for the issue?
I'm a bit confused about that. so should I fix things for eslint 10 and continue to let errors crash? or do you prefer my suggested fix for the issue?
Once it's clarified, I can open a PR right away.
thanks 🙏
Activity
ljharb commentedon Mar 5, 2026
I don't believe there's a released version of the config yet that works with eslint 9. However, unreleased code should, so a PR would be great.
Please be sure not to use an LLM to generate the code, since LLM-generated code is not copyrightable and thus can't be accepted to any open source project.
dataCenter430 commentedon Mar 5, 2026
@ljharb Thanks for the clarification.
I’m sorry if my PR wasn’t clear, I may not have explained it well.
there is no code to generate using LLM. 😄
Let me try to clarify it better.
dataCenter430 commentedon Mar 5, 2026
I think exception handler should be there.
Does it make sense?
I've already fixed them on my end.
if you want, I will open PRs for it right away.
dataCenter430 commentedon Mar 5, 2026
Hey, @ljharb
I should be assigned to work on this, right?
If so, could you pls assign it to me?
thank you
ljharb commentedon Mar 6, 2026
A catch callback will mask an error - if there's an error, things should crash. Instead, fix things for eslint 10 and continue to let errors crash.
No, nothing is ever assigned in open source, anywhere, ever. Just make a PR.
dataCenter430 commentedon Mar 6, 2026
okay, if you want, I will make a PR for this issue right away. thanks
dataCenter430 commentedon Mar 6, 2026
Hi, there @ljharb ?
One question - would you like me to implement it directly rather than just suggesting a fix for the issue?
I'm a bit confused about that. so should I fix things for eslint 10 and continue to let errors crash? or do you prefer my suggested fix for the issue?
Once it's clarified, I can open a PR right away.
thanks 🙏
ljharb commentedon Mar 6, 2026
yes, that seems best.