react-doctor 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -52,11 +52,52 @@ Options:
52
52
  --score output only the score
53
53
  -y, --yes skip prompts, scan all workspace projects
54
54
  --project <name> select workspace project (comma-separated for multiple)
55
+ --diff [base] scan only files changed vs base branch
55
56
  --fix open Ami to auto-fix all issues
56
57
  --prompt copy latest scan output to clipboard
57
58
  -h, --help display help for command
58
59
  ```
59
60
 
61
+ ## Configuration
62
+
63
+ Create a `react-doctor.config.json` in your project root to customize behavior:
64
+
65
+ ```json
66
+ {
67
+ "ignore": {
68
+ "rules": ["react/no-danger", "jsx-a11y/no-autofocus", "knip/exports"],
69
+ "files": ["src/generated/**"]
70
+ }
71
+ }
72
+ ```
73
+
74
+ You can also use the `"reactDoctor"` key in your `package.json` instead:
75
+
76
+ ```json
77
+ {
78
+ "reactDoctor": {
79
+ "ignore": {
80
+ "rules": ["react/no-danger"]
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ If both exist, `react-doctor.config.json` takes precedence.
87
+
88
+ ### Config options
89
+
90
+ | Key | Type | Default | Description |
91
+ | -------------- | ------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
92
+ | `ignore.rules` | `string[]` | `[]` | Rules to suppress, using the `plugin/rule` format shown in diagnostic output (e.g. `react/no-danger`, `knip/exports`, `knip/types`) |
93
+ | `ignore.files` | `string[]` | `[]` | File paths to exclude, supports glob patterns (`src/generated/**`, `**/*.test.tsx`) |
94
+ | `lint` | `boolean` | `true` | Enable/disable lint checks (same as `--no-lint`) |
95
+ | `deadCode` | `boolean` | `true` | Enable/disable dead code detection (same as `--no-dead-code`) |
96
+ | `verbose` | `boolean` | `false` | Show file details per rule (same as `--verbose`) |
97
+ | `diff` | `boolean \| string` | — | Force diff mode (`true`) or pin a base branch (`"main"`). Set to `false` to disable auto-detection. |
98
+
99
+ CLI flags always override config values.
100
+
60
101
  ## Node.js API
61
102
 
62
103
  You can also use React Doctor programmatically: