Title: No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path) · Issue #3238 · airbnb/javascript · GitHub
Open Graph Title: No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path) · Issue #3238 · airbnb/javascript
X Title: No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path) · Issue #3238 · airbnb/javascript
Description: 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 c...
Open Graph Description: 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 n...
X Description: 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 n...
Opengraph URL: https://github.com/airbnb/javascript/issues/3238
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)","articleBody":"## Summary\nWhen `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.\n\n## Impact\n- 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.\n- `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.\n\n## Affected files\n- `packages/eslint-config-airbnb-base/whitespace.js` (line 55)\n- `packages/eslint-config-airbnb/whitespace.js` (line 55)\n\n## Suggested fix\nWrap 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.\n\n## screenshot\n\n\u003cimg width=\"1574\" height=\"363\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/55300261-9c27-4096-b8e1-3aafd1a7728b\" /\u003e\n\nI'd love to work on this.","author":{"url":"https://github.com/dataCenter430","@type":"Person","name":"dataCenter430"},"datePublished":"2026-03-05T19:18:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/3238/javascript/issues/3238"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:54d267ce-0485-426c-881d-283857c84f2c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C8CC:30AF96:1A18A4:2301C3:6A5EC81F |
| html-safe-nonce | e4f3adacc345f8320b531080991ad3f6ef879a4da9e4f82cdeba80b51c22fa79 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOENDOjMwQUY5NjoxQTE4QTQ6MjMwMUMzOjZBNUVDODFGIiwidmlzaXRvcl9pZCI6Ijg5MTE5MTc5MTQyMDYyMjg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c7b5800a4f63cbc21dc1997d2d2acf493d0ed8658a13ae48b0da021d7262916a |
| hovercard-subject-tag | issue:4030110086 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/airbnb/javascript/3238/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6beba750217f099ef2e421d159e33d4dd66037d0976b718d2e57cca1bd9e4f86/airbnb/javascript/issues/3238 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6beba750217f099ef2e421d159e33d4dd66037d0976b718d2e57cca1bd9e4f86/airbnb/javascript/issues/3238 |
| og:image:alt | 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 n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dataCenter430 |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbe2b3a3baf2f0e0ac1671a4d190d9de098dcf218eb73137ad46da364d3df398 |
| turbo-cache-control | no-preview |
| go-import | github.com/airbnb/javascript git https://github.com/airbnb/javascript.git |
| octolytics-dimension-user_id | 698437 |
| octolytics-dimension-user_login | airbnb |
| octolytics-dimension-repository_id | 6498492 |
| octolytics-dimension-repository_nwo | airbnb/javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 6498492 |
| octolytics-dimension-repository_network_root_nwo | airbnb/javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0cd844a7ab298ec8d89b66ef4b195d158229d335 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width