Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)

オープン
#3,238 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

@dataCenter430 がすでに取り組んでいます。

2026年3月6日 から。

  • #3239 @dataCenter430 による — オープン
  • #3306 @loulanyue による — マージされずにクローズ
  • #3319 @bodapatisaikrishna による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
eslint, javascript
領域
tooling

調査の方向性

packages/eslint-config-airbnb-base/whitespace.js と packages/eslint-config-airbnb/whitespace.js の 55 行目から始め、CLIEngine が利用できない場合に execSync と JSON.parse が使用する経路を追跡します。Child script の失敗や無効な出力で明確な診断が生成され、設定の正常な読み込みが引き続き機能すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

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.

Affected files

  • packages/eslint-config-airbnb-base/whitespace.js (line 55)
  • packages/eslint-config-airbnb/whitespace.js (line 55)

Suggested fix

Wrap the execSync call and JSON.parse in try/catch and rethrow with a clear message (and optionally cause: err) so failures are easier to diagnose.

screenshot

Image

I'd love to work on this.

主要言語
JavaScript
スター
148k
フォーク
26.6k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

airbnb/javascript のほかの issue

airbnb/javascript の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。