From 5b602eebf58f8b09f5aed91344bf0e11229236fe Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 10:29:50 +0200 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=90=9B=20Remove=20non-existent=20rule?= =?UTF-8?q?=20`jsx-a11y/no-noninteractive-element-interactions`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/millionco/react-doctor/issues/113 --- packages/react-doctor/src/oxlint-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-doctor/src/oxlint-config.ts b/packages/react-doctor/src/oxlint-config.ts index 8dfb56436..f11b91de1 100644 --- a/packages/react-doctor/src/oxlint-config.ts +++ b/packages/react-doctor/src/oxlint-config.ts @@ -97,7 +97,6 @@ export const createOxlintConfig = ({ "jsx-a11y/anchor-is-valid": "warn", "jsx-a11y/click-events-have-key-events": "warn", "jsx-a11y/no-static-element-interactions": "warn", - "jsx-a11y/no-noninteractive-element-interactions": "warn", "jsx-a11y/role-has-required-aria-props": "error", "jsx-a11y/no-autofocus": "warn", "jsx-a11y/heading-has-content": "warn", From 7dfbb06745e9557a548d620c1ad378de67a9e8ae Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 10:52:21 +0200 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=93=A6=20Setup=20@proda-ai/react-doct?= =?UTF-8?q?or=20publishing=20to=20GitHub=20Packages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename package to @proda-ai/react-doctor - Add publishConfig for GitHub Packages registry - Add publish workflow with auto version bump on merge to main --- .github/workflows/publish.yml | 63 ++++++++++++++++++++++++++++++ packages/react-doctor/package.json | 13 +++--- 2 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..80fd4901e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,63 @@ +name: Publish to GitHub Packages + +on: + push: + branches: [main] + paths: + - "packages/react-doctor/**" + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: "https://npm.pkg.github.com" + scope: "@proda-ai" + cache: pnpm + + - run: pnpm install --frozen-lockfile + + - name: Bump version + working-directory: packages/react-doctor + run: | + CURRENT=$(node -p "require('./package.json').version") + # Extract proda suffix number, increment it + if [[ "$CURRENT" =~ -proda\.([0-9]+)$ ]]; then + BASE="${CURRENT%-proda.*}" + NUM="${BASH_REMATCH[1]}" + NEXT="$BASE-proda.$((NUM + 1))" + else + NEXT="$CURRENT-proda.1" + fi + npm version "$NEXT" --no-git-tag-version + echo "VERSION=$NEXT" >> "$GITHUB_ENV" + echo "📦 Version: $NEXT" + + - name: Build + working-directory: packages/react-doctor + run: pnpm build + + - name: Publish + working-directory: packages/react-doctor + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Commit version bump + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add packages/react-doctor/package.json + git commit -m "📦 Release @proda-ai/react-doctor@${{ env.VERSION }} [skip ci]" + git push diff --git a/packages/react-doctor/package.json b/packages/react-doctor/package.json index 5bb3ca857..89e3cdafb 100644 --- a/packages/react-doctor/package.json +++ b/packages/react-doctor/package.json @@ -1,6 +1,6 @@ { - "name": "react-doctor", - "version": "0.0.30", + "name": "@proda-ai/react-doctor", + "version": "0.0.30-proda.0", "description": "Diagnose and fix performance issues in your React app", "keywords": [ "diagnostics", @@ -9,17 +9,20 @@ "performance", "react" ], - "homepage": "https://github.com/aidenybai/react-doctor#readme", + "homepage": "https://github.com/proda-ai/react-doctor#readme", "bugs": { - "url": "https://github.com/aidenybai/react-doctor/issues" + "url": "https://github.com/proda-ai/react-doctor/issues" }, "license": "MIT", "author": "Aiden Bai", "repository": { "type": "git", - "url": "https://github.com/aidenybai/react-doctor.git", + "url": "https://github.com/proda-ai/react-doctor.git", "directory": "packages/react-doctor" }, + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "bin": { "react-doctor": "./dist/cli.js" }, From 8b4cc9831ed3bf61a680cd9c4f422358f99eb1e1 Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 10:54:24 +0200 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=94=A7=20Fix=20formatting=20for=20oxf?= =?UTF-8?q?mt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-doctor/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-doctor/package.json b/packages/react-doctor/package.json index 89e3cdafb..fc06a2b07 100644 --- a/packages/react-doctor/package.json +++ b/packages/react-doctor/package.json @@ -20,9 +20,6 @@ "url": "https://github.com/proda-ai/react-doctor.git", "directory": "packages/react-doctor" }, - "publishConfig": { - "registry": "https://npm.pkg.github.com" - }, "bin": { "react-doctor": "./dist/cli.js" }, @@ -44,6 +41,9 @@ "default": "./dist/react-doctor-plugin.js" } }, + "publishConfig": { + "registry": "https://npm.pkg.github.com" + }, "scripts": { "dev": "tsdown --watch", "build": "rm -rf dist && NODE_ENV=production tsdown", From d9c2295c1d78495eefa2ab37667ec29e6e825de1 Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 10:58:41 +0200 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=94=A7=20Manual=20version=20bumps=20w?= =?UTF-8?q?ith=20CI=20validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove auto-bump from publish workflow - Add version check on PRs that touch package.json - Same check on main before publishing (safety net) --- .github/workflows/check-version.yml | 36 +++++++++++++++++++++++++++++ .github/workflows/publish.yml | 32 ++++++++----------------- 2 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/check-version.yml diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml new file mode 100644 index 000000000..313a4a2cd --- /dev/null +++ b/.github/workflows/check-version.yml @@ -0,0 +1,36 @@ +name: Version check + +on: + pull_request: + branches: [main] + paths: + - "packages/react-doctor/package.json" + +jobs: + check-version: + runs-on: ubuntu-latest + permissions: + packages: read + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + registry-url: "https://npm.pkg.github.com" + scope: "@proda-ai" + + - name: Verify version is not already published + working-directory: packages/react-doctor + run: | + VERSION=$(node -p "require('./package.json').version") + echo "Checking @proda-ai/react-doctor@$VERSION..." + if npm view "@proda-ai/react-doctor@$VERSION" version --registry=https://npm.pkg.github.com 2>/dev/null; then + echo "" + echo "❌ Version $VERSION is already published to GitHub Packages." + echo " Bump the version in packages/react-doctor/package.json before merging." + exit 1 + fi + echo "✅ Version $VERSION is available for publishing" + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 80fd4901e..9d1c69266 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,12 +10,9 @@ jobs: publish: runs-on: ubuntu-latest permissions: - contents: write packages: write steps: - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - uses: pnpm/action-setup@v4 @@ -28,21 +25,18 @@ jobs: - run: pnpm install --frozen-lockfile - - name: Bump version + - name: Check version is not already published working-directory: packages/react-doctor run: | - CURRENT=$(node -p "require('./package.json').version") - # Extract proda suffix number, increment it - if [[ "$CURRENT" =~ -proda\.([0-9]+)$ ]]; then - BASE="${CURRENT%-proda.*}" - NUM="${BASH_REMATCH[1]}" - NEXT="$BASE-proda.$((NUM + 1))" - else - NEXT="$CURRENT-proda.1" + VERSION=$(node -p "require('./package.json').version") + echo "VERSION=$VERSION" >> "$GITHUB_ENV" + if npm view "@proda-ai/react-doctor@$VERSION" version --registry=https://npm.pkg.github.com 2>/dev/null; then + echo "❌ Version $VERSION is already published. Bump the version in package.json before merging." + exit 1 fi - npm version "$NEXT" --no-git-tag-version - echo "VERSION=$NEXT" >> "$GITHUB_ENV" - echo "📦 Version: $NEXT" + echo "✅ Version $VERSION is not yet published" + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build working-directory: packages/react-doctor @@ -53,11 +47,3 @@ jobs: run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Commit version bump - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add packages/react-doctor/package.json - git commit -m "📦 Release @proda-ai/react-doctor@${{ env.VERSION }} [skip ci]" - git push From d8862291016a2129b078248afbd1121115b169c7 Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 11:01:09 +0200 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=93=9D=20Add=20fork=20rationale,=20ve?= =?UTF-8?q?rsioning,=20and=20CI=20docs=20to=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-doctor/README.md | 79 ++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/packages/react-doctor/README.md b/packages/react-doctor/README.md index 51ea10cee..1d11ee3a8 100644 --- a/packages/react-doctor/README.md +++ b/packages/react-doctor/README.md @@ -4,8 +4,83 @@ React Doctor -[![version](https://img.shields.io/npm/v/react-doctor?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/react-doctor) -[![downloads](https://img.shields.io/npm/dt/react-doctor.svg?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/react-doctor) +# `@proda-ai/react-doctor` + +> **This is a Proda fork of [millionco/react-doctor](https://github.com/millionco/react-doctor).** + +## Why this fork exists + +React Doctor has hardcoded thresholds (e.g. 300 lines for `no-giant-component`) with no way to configure them per-directory or per-rule. The upstream config only supports globally ignoring rules or files — there is no middle ground. + +We needed: +- **Per-directory threshold overrides** — view components are naturally larger than leaf components, and a single global limit doesn't fit both +- **Bug fixes** not yet released upstream (e.g. [#113](https://github.com/millionco/react-doctor/issues/113) — non-existent `jsx-a11y/no-noninteractive-element-interactions` rule breaking the score) + +This fork is published as `@proda-ai/react-doctor` on GitHub Packages. Upstream contributions are welcome and will be submitted back when possible. + +## What's different from upstream + +| Change | Status | +|---|---| +| Remove non-existent `jsx-a11y/no-noninteractive-element-interactions` rule ([#113](https://github.com/millionco/react-doctor/issues/113)) | ✅ Merged | +| Configurable per-directory thresholds via `react-doctor.config.json` | 🔜 On branch `feat/configurable-thresholds` | + +### Configurable thresholds (planned) + +```json +{ + "thresholds": { + "component-lines": { + "default": 300, + "overrides": [ + { "files": ["src/ui/views/**"], "max": 400 } + ] + } + } +} +``` + +## Versioning + +Versions follow `{upstream}-proda.{N}`: + +| Version | Meaning | +|---|---| +| `0.0.30-proda.1` | Based on upstream `0.0.30`, Proda patch 1 | +| `0.0.30-proda.2` | Same upstream base, next Proda change | +| `0.0.31-proda.1` | After merging upstream `0.0.31`, first Proda patch | + +The version is **set manually** in `packages/react-doctor/package.json` as part of the PR. Bump the `proda.N` suffix when making changes. + +## CI / CD + +### On pull requests + +- **CI / test** — runs tests, lint, and format checks (upstream workflow) +- **Version check** — if `package.json` was changed, verifies the version doesn't already exist in GitHub Packages. Fails with a clear message if you forgot to bump + +### On merge to main + +- **Publish** — builds with Node 24, verifies the version is new (safety net), and publishes `@proda-ai/react-doctor` to GitHub Packages. No manual steps needed + +### How to release a new version + +1. Make your changes in a PR +2. Bump the version in `packages/react-doctor/package.json` (increment the `proda.N` suffix) +3. CI validates the version is available +4. Merge — package is published automatically + +### Syncing with upstream + +1. `git fetch upstream && git merge upstream/main` +2. Update the base version to match upstream (e.g. `0.0.31-proda.1`) +3. Resolve conflicts if any, open a PR + +--- + +*Original README follows below.* + +--- Let coding agents diagnose and fix your React code. From 420bd4812632558e23d4a98522e0d2e870dcf5f2 Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 11:01:40 +0200 Subject: [PATCH 6/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Share=20version=20chec?= =?UTF-8?q?k=20between=20PR=20and=20publish=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check-version.yml | 1 + .github/workflows/publish.yml | 17 ++++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index 313a4a2cd..6d98421b7 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -5,6 +5,7 @@ on: branches: [main] paths: - "packages/react-doctor/package.json" + workflow_call: jobs: check-version: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d1c69266..61f3a3d56 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,11 @@ on: - "packages/react-doctor/**" jobs: + version-check: + uses: ./.github/workflows/check-version.yml + publish: + needs: version-check runs-on: ubuntu-latest permissions: packages: write @@ -25,19 +29,6 @@ jobs: - run: pnpm install --frozen-lockfile - - name: Check version is not already published - working-directory: packages/react-doctor - run: | - VERSION=$(node -p "require('./package.json').version") - echo "VERSION=$VERSION" >> "$GITHUB_ENV" - if npm view "@proda-ai/react-doctor@$VERSION" version --registry=https://npm.pkg.github.com 2>/dev/null; then - echo "❌ Version $VERSION is already published. Bump the version in package.json before merging." - exit 1 - fi - echo "✅ Version $VERSION is not yet published" - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Build working-directory: packages/react-doctor run: pnpm build From 2d79845a0042b4de88b956268cf479b606a31474 Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 11:03:36 +0200 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=94=A7=20Fix=20README=20formatting=20?= =?UTF-8?q?for=20oxfmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-doctor/README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/react-doctor/README.md b/packages/react-doctor/README.md index 1d11ee3a8..b39454b3d 100644 --- a/packages/react-doctor/README.md +++ b/packages/react-doctor/README.md @@ -13,6 +13,7 @@ React Doctor has hardcoded thresholds (e.g. 300 lines for `no-giant-component`) with no way to configure them per-directory or per-rule. The upstream config only supports globally ignoring rules or files — there is no middle ground. We needed: + - **Per-directory threshold overrides** — view components are naturally larger than leaf components, and a single global limit doesn't fit both - **Bug fixes** not yet released upstream (e.g. [#113](https://github.com/millionco/react-doctor/issues/113) — non-existent `jsx-a11y/no-noninteractive-element-interactions` rule breaking the score) @@ -20,10 +21,10 @@ This fork is published as `@proda-ai/react-doctor` on GitHub Packages. Upstream ## What's different from upstream -| Change | Status | -|---|---| -| Remove non-existent `jsx-a11y/no-noninteractive-element-interactions` rule ([#113](https://github.com/millionco/react-doctor/issues/113)) | ✅ Merged | -| Configurable per-directory thresholds via `react-doctor.config.json` | 🔜 On branch `feat/configurable-thresholds` | +| Change | Status | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | +| Remove non-existent `jsx-a11y/no-noninteractive-element-interactions` rule ([#113](https://github.com/millionco/react-doctor/issues/113)) | ✅ Merged | +| Configurable per-directory thresholds via `react-doctor.config.json` | 🔜 On branch `feat/configurable-thresholds` | ### Configurable thresholds (planned) @@ -32,9 +33,7 @@ This fork is published as `@proda-ai/react-doctor` on GitHub Packages. Upstream "thresholds": { "component-lines": { "default": 300, - "overrides": [ - { "files": ["src/ui/views/**"], "max": 400 } - ] + "overrides": [{ "files": ["src/ui/views/**"], "max": 400 }] } } } @@ -44,10 +43,10 @@ This fork is published as `@proda-ai/react-doctor` on GitHub Packages. Upstream Versions follow `{upstream}-proda.{N}`: -| Version | Meaning | -|---|---| -| `0.0.30-proda.1` | Based on upstream `0.0.30`, Proda patch 1 | -| `0.0.30-proda.2` | Same upstream base, next Proda change | +| Version | Meaning | +| ---------------- | -------------------------------------------------- | +| `0.0.30-proda.1` | Based on upstream `0.0.30`, Proda patch 1 | +| `0.0.30-proda.2` | Same upstream base, next Proda change | | `0.0.31-proda.1` | After merging upstream `0.0.31`, first Proda patch | The version is **set manually** in `packages/react-doctor/package.json` as part of the PR. Bump the `proda.N` suffix when making changes. @@ -78,7 +77,7 @@ The version is **set manually** in `packages/react-doctor/package.json` as part --- -*Original README follows below.* +_Original README follows below._ --- From dcf9a2a0a4298c02dbd149fb054d8c98f53c1eba Mon Sep 17 00:00:00 2001 From: Mateusz Choma Date: Thu, 2 Apr 2026 11:04:33 +0200 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=A6=20Set=20initial=20version=20to?= =?UTF-8?q?=200.0.30-proda.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react-doctor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-doctor/package.json b/packages/react-doctor/package.json index fc06a2b07..bf30bd72d 100644 --- a/packages/react-doctor/package.json +++ b/packages/react-doctor/package.json @@ -1,6 +1,6 @@ { "name": "@proda-ai/react-doctor", - "version": "0.0.30-proda.0", + "version": "0.0.30-proda.1", "description": "Diagnose and fix performance issues in your React app", "keywords": [ "diagnostics",