From 928784aa33d21523a29429fabf449fd37d83f1ba Mon Sep 17 00:00:00 2001 From: Tommaso Casaburi Date: Fri, 5 Jun 2026 19:12:13 +0700 Subject: [PATCH] fix(react-doctor): correctly exclude test files from scoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The intended test-file ignore in react-doctor.config.json was never applied: react-doctor's config precedence reads the "reactDoctor" key in package.json (which had no ignore), shadowing the config file. On top of that, react-doctor 0.4.0's ignore.files matcher is broken — any non-empty value collapses scan scope and drops real product files, not just tests. Consolidate to a single canonical doctor.config.json using ignore.overrides (which works correctly): only test files are excluded while all product code is still scored. Remove the shadowing package.json key and the dead react-doctor.config.json. Product-code baseline is 55 (92 errors, 515 warnings, 118 files). --- doctor.config.json | 6 ++++++ package.json | 3 --- react-doctor.config.json | 6 ------ 3 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 doctor.config.json delete mode 100644 react-doctor.config.json diff --git a/doctor.config.json b/doctor.config.json new file mode 100644 index 00000000..84e194d9 --- /dev/null +++ b/doctor.config.json @@ -0,0 +1,6 @@ +{ + "diff": false, + "ignore": { + "overrides": [{ "files": ["**/__tests__/**", "**/*.test.*"] }] + } +} diff --git a/package.json b/package.json index 7279848f..c269f68a 100644 --- a/package.json +++ b/package.json @@ -259,8 +259,5 @@ "commitizen": { "path": "./node_modules/cz-conventional-changelog" } - }, - "reactDoctor": { - "diff": false } } diff --git a/react-doctor.config.json b/react-doctor.config.json deleted file mode 100644 index 3f23fe12..00000000 --- a/react-doctor.config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "diff": false, - "ignore": { - "files": ["**/__tests__/**", "**/*.test.*"] - } -}