#3238·javascript

execSync + JSON.parse 在 whitespace.js 中没有错误处理 (ESLint 9 路径)

作者: dataCenter430创建于 2026年3月5日更新于 2026年3月6日

摘要

CLIEngine 不可用(例如 ESLint 9)时,whitespace.js 会通过运行 whitespace-async.js 并使用 execSync 来加载配置,然后对结果执行 JSON.parse(String(...))。 此处没有 try/catch 语句。

内容来源: airbnb/javascript