Skip to content

Invalid config is warned twice and blocks package.json fallback #51

@Taiki92777

Description

@Taiki92777

Summary

Invalid react-doctor.config.json handling has two problems:

  1. parse warning is logged twice in a single run
  2. 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

  1. Put malformed JSON in react-doctor.config.json.
  2. Add valid reactDoctor config in package.json.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions