Skip to content

CLI cannot explicitly re-enable lint/dead-code when config disables them #50

@Taiki92777

Description

@Taiki92777

Summary

react-doctor cannot explicitly re-enable lint / deadCode from CLI when those are disabled in config.

Current behavior

If config sets:

{
  "lint": false,
  "deadCode": false
}

you can disable via --no-lint / --no-dead-code, but cannot re-enable using --lint / --dead-code because those flags do not exist.

Why this is a problem

README says CLI flags override config, but this only works one-way for booleans.

Reproduction

  1. Create react-doctor.config.json with lint: false and deadCode: false.
  2. Run react-doctor ..
  3. Try to force-enable checks from CLI.

Observed:

  • --lint -> unknown option
  • --dead-code -> unknown option

Expected behavior

--lint and --dead-code should exist and override config values to true.

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