feat: config foundation — extends, zod validation, concurrency, barrelAllowlist#287
Closed
aidenybai wants to merge 1 commit into
Closed
feat: config foundation — extends, zod validation, concurrency, barrelAllowlist#287aidenybai wants to merge 1 commit into
aidenybai wants to merge 1 commit into
Conversation
|
🔴 No new issues 0/100 (unchanged) Reviewed by react-review for commit ebb1c04. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 17, 2026
3fdd119 to
9287d69
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
9287d69 to
a6a1db3
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
a6a1db3 to
7abb104
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
7abb104 to
e42aee0
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e42aee0. Configure here.
…lAllowlist Three independent config knobs grouped on a shared zod-based validator foundation. None of these change the scan execution path - they affect config loading, project orchestration, and one rule's allowlist. - `extends`: ReactDoctorConfig grows a string | string[] field; each parent is loaded the same way the top-level config is. Cycle and depth guards keep pathological configs from hanging the loader. Semantics match tsconfig / eslint: later entries override earlier ones on scalar conflicts; arrays concat + dedupe; the current config always wins over anything it extends. - zod refactor: replace ~280 lines of hand-rolled type checks in `validate-config-types.ts` with declarative zod schemas. One descriptor table per ReactDoctorConfig field, one parseFieldOrWarn helper that preserves the exact stderr message shape the existing --json mode and the 14 validate-config-types tests rely on. Filtering record / array transforms keep the drop-and-warn-but-keep- valid-siblings semantics so a single bad entry never invalidates the whole list. - `concurrency`: --concurrency <n> CLI flag + top-level config field. Workspace projects scan in parallel via runWithConcurrency (output ordering preserved); default 1, clamped to 32. - `barrelAllowlist`: glob list matched against the resolved barrel index file's path. no-barrel-import reads it via plugin settings and skips reports against any matching barrel. Differs from ignore.overrides[].rules because it keys on the IMPORTED barrel rather than every IMPORTER. 20 new tests across extends-config, merge-configs, validate-config-types, matches-barrel-allowlist, and run-with-concurrency suites. Total 1192 tests passing. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
e42aee0 to
ebb1c04
Compare
cursor Bot
pushed a commit
that referenced
this pull request
May 17, 2026
Second of a three-PR split of #286. Stacked on cursor/config-foundation-675b (PR #287). Both features are scan-time filters that combine with diff mode, both extend InspectResult / JsonReport, both touch action.yml inputs. - Baseline mode: --baseline [path] / --update-baseline. Stable per-diagnostic fingerprint (plugin + rule + filepath + message; line / column intentionally excluded so unrelated edits don't break the baseline). Baseline counts surface in InspectResult.baselineDiagnostics, JsonReport.summary.baselineDiagnosticCount, and the PR comment header ("9 baseline issues, no new violations"). - Touched-line enforcement: --touched-lines. In diff or staged mode, restricts diagnostics to lines actually touched by the active diff (git diff --unified=0). DiffInfo.diffBaseRef + a HEAD baseRef for current-changes mode so staged-only edits aren't silently dropped. Hidden-by-touched-lines counts surface in the JSON report. - action.yml: baseline + touched-lines inputs alongside the existing annotations input. - 25 new tests across baseline + get-touched-lines suites. 1217 tests passing; lint / typecheck / format clean. Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

First of a three-PR split of #286 ("Support mature-codebase adoption workflows natively"). This one lands the foundational config surface; the next two stack on top of it.
Why this PR exists
Three independent config knobs grouped on a shared zod-based validator. None of these change the scan execution path — they affect config loading, project orchestration, and one rule's allowlist.
What's in it
extends— config inheritance{ "extends": ["../../react-doctor.base.json"], "customRulesOnly": true }tsconfig/eslint: later entries override earlier ones on scalar conflicts; arrays concat + dedupe; nested objects merge field-by-field; the current config always wins over anything it extends.zod-based validation framework
Replaces ~280 lines of hand-rolled
typeof === "..."/Array.isArray/isPlainObjectchecks invalidate-config-types.tswith a declarative zod schema map.FieldDescriptorentry perReactDoctorConfigfield ({ expectedDescription, schema }).parseFieldOrWarnhelper preserves the exact stderr message shape the existing--jsonmode and the 14validate-config-typestests rely on (config field "X" must be …; ignoring this field).filteringArrayTransformhigher-order helper unifies the drop-and-warn-but-keep-valid-siblings semantics acrossextends,barrelAllowlist, and the surface include/exclude lists.zod ^4added as a dependency of@react-doctor/core.concurrency— parallel runnerreact-doctor . --concurrency 4--concurrency <n>CLI flag + top-levelconcurrencyconfig field.runWithConcurrency(output ordering preserved).1; clamped to[1, 32].barrelAllowlist—no-barrel-importallowlist{ "barrelAllowlist": ["packages/*/src/index.ts", "src/components/ui/index.ts"] }ignore.overrides[].rules: this keys on the imported barrel path (one entry exempts every importer), whereas the override system keys on the importer (one entry per importer file).Stats
extends-config,merge-configs,validate-config-types,matches-barrel-allowlist, andrun-with-concurrency.What's NOT in this PR
action.ymlknob additions for the new inputs — in stacked PRs 2/3.Originally landed as part of #286; that PR is being closed in favor of this 3-way split.