Summary
Invalid react-doctor.config.json handling has two problems:
- parse warning is logged twice in a single run
- fallback to
package.json reactDoctor config is skipped
Current behavior
When react-doctor.config.json is malformed, loadConfig logs a warning and returns early. This causes:
- duplicated warning output (config loaded in two places)
- no fallback to embedded
package.json config
Reproduction
- Put malformed JSON in
react-doctor.config.json.
- Add valid
reactDoctor config in package.json.
- Run
react-doctor ..
Observed:
- parse warning appears twice
- behavior does not use valid fallback config from
package.json
Expected behavior
- parse warning should appear once per run
- malformed
react-doctor.config.json should still allow fallback to package.json reactDoctor
Summary
Invalid
react-doctor.config.jsonhandling has two problems:package.jsonreactDoctorconfig is skippedCurrent behavior
When
react-doctor.config.jsonis malformed,loadConfiglogs a warning and returns early. This causes:package.jsonconfigReproduction
react-doctor.config.json.reactDoctorconfig inpackage.json.react-doctor ..Observed:
package.jsonExpected behavior
react-doctor.config.jsonshould still allow fallback topackage.jsonreactDoctor