No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)
@dataCenter430 ci sta già lavorando.
Dal 6/3/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- eslint, javascript
- Ambito
- tooling
Direzione di ricerca
Inizia dalla riga 55 in packages/eslint-config-airbnb-base/whitespace.js e packages/eslint-config-airbnb/whitespace.js, seguendo il percorso che usa execSync e JSON.parse quando CLIEngine non è disponibile. Il lavoro è completato quando gli errori degli script figli e gli output non validi producono una diagnosi chiara, mentre il caricamento corretto della configurazione continua a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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),
execSyncmay throw or return non-JSON. JSON.parsewill 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
I'd love to work on this.
- Lingua principale
- JavaScript
- Stelle
- 148k
- Fork
- 26.6k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di airbnb/javascript
-
Severity: Unhandled promise rejection in `whitespace-async.js` when ESLint async path is usedForse già presa @bodapatisaikrishna l’ha presa 24 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
airbnb/javascript#3237 · 6 commenti ·
-
Inconsistent semicolon usage in examples (Arrays vs Functions)Forse già presa @Developer-shivamMishra l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
airbnb/javascript#3152 · 4 commenti ·
-
Upgrading eslint-plugin-react-hooksForse già presa @weihongyu12 l’ha presa 365 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
airbnb/javascript#3186 · 3 commenti · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
airbnb/javascript#3173 · 9 commenti · 1 reazione ·
-
Isn't section 5.1 "Use object destructuring" conflicting with 3.3 "Use object method shorthand" ?Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
airbnb/javascript#3136 · 11 commenti ·
Tutte le issue di airbnb/javascript
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
blamechris/chroxy#8579 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
modusensus/dsh-mneme#411 ·
-
Flaky (suspected): VideoTimelineEditor bed audio test sees 600px instead of 120px under CI loadAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Actions on ToastsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
XRPLF/xrpl-dev-portal#4000 ·
I maintainer di solito rispondono entro 1 giorno