react-doctor 0.4.2-dev.727894a → 0.4.2-dev.773e235

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="03c21420-4548-560c-9a26-8c22558218d8")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e34a2d72-4bb4-5cc3-a375-1c5dd155f5ce")}catch(e){}}();
3
3
  import { createRequire } from "node:module";
4
4
  import * as Schema from "effect/Schema";
5
5
  import * as fs$1 from "node:fs";
@@ -2125,8 +2125,8 @@ const isFile = (filePath) => {
2125
2125
  return false;
2126
2126
  }
2127
2127
  };
2128
- const SOURCE_FILE_PATTERN = /\.(tsx?|jsx?)$/;
2129
- const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.js$/i;
2128
+ const SOURCE_FILE_PATTERN = /\.(tsx?|jsx?|mts|mjs)$/;
2129
+ const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
2130
2130
  const MINIFIED_SNIFF_BYTES = 65536;
2131
2131
  const GIT_LS_FILES_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
2132
2132
  const IGNORED_DIRECTORIES = new Set([
@@ -3695,7 +3695,6 @@ const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
3695
3695
  "react/jsx-no-new-function-as-prop": "react-doctor/jsx-no-new-function-as-prop",
3696
3696
  "react/jsx-no-new-object-as-prop": "react-doctor/jsx-no-new-object-as-prop",
3697
3697
  "react/jsx-no-script-url": "react-doctor/jsx-no-script-url",
3698
- "react/jsx-no-target-blank": "react-doctor/jsx-no-target-blank",
3699
3698
  "react/jsx-no-undef": "react-doctor/jsx-no-undef",
3700
3699
  "react/jsx-no-useless-fragment": "react-doctor/jsx-no-useless-fragment",
3701
3700
  "react/jsx-pascal-case": "react-doctor/jsx-pascal-case",
@@ -4867,51 +4866,51 @@ const FLAGGED_DEPENDENCIES = [
4867
4866
  {
4868
4867
  packageName: "expo-modules-autolinking",
4869
4868
  rule: "expo-no-redundant-dependency",
4870
- message: "\"expo-modules-autolinking\" should not be a direct dependency — Expo installs it transitively as needed",
4869
+ message: "\"expo-modules-autolinking\" should not be a direct dependency. Expo pins the compatible version through the SDK, and a direct entry can drift to a version that breaks prebuild, Metro, or native builds",
4871
4870
  help: "Remove `expo-modules-autolinking` from your package.json"
4872
4871
  },
4873
4872
  {
4874
4873
  packageName: "expo-dev-launcher",
4875
4874
  rule: "expo-no-redundant-dependency",
4876
- message: "\"expo-dev-launcher\" should not be a direct dependency — it is pulled in by `expo-dev-client`",
4875
+ message: "\"expo-dev-launcher\" should not be a direct dependency. `expo-dev-client` pins the compatible launcher, and a direct entry can drift to a version that breaks native builds",
4877
4876
  help: "Remove `expo-dev-launcher` and depend on `expo-dev-client` instead"
4878
4877
  },
4879
4878
  {
4880
4879
  packageName: "expo-dev-menu",
4881
4880
  rule: "expo-no-redundant-dependency",
4882
- message: "\"expo-dev-menu\" should not be a direct dependency — it is pulled in by `expo-dev-client`",
4881
+ message: "\"expo-dev-menu\" should not be a direct dependency. `expo-dev-client` pins the compatible dev menu, and a direct entry can drift to a version that breaks native builds",
4883
4882
  help: "Remove `expo-dev-menu` and depend on `expo-dev-client` instead"
4884
4883
  },
4885
4884
  {
4886
4885
  packageName: "expo-modules-core",
4887
4886
  rule: "expo-no-redundant-dependency",
4888
- message: "\"expo-modules-core\" should not be a direct dependency — use the API re-exported from the `expo` package",
4887
+ message: "\"expo-modules-core\" should not be a direct dependency. Expo pins the compatible native core, and a direct entry can drift to a version that breaks prebuild or native builds",
4889
4888
  help: "Remove `expo-modules-core` from your package.json and import from `expo` instead"
4890
4889
  },
4891
4890
  {
4892
4891
  packageName: "@expo/metro-config",
4893
4892
  rule: "expo-no-redundant-dependency",
4894
- message: "\"@expo/metro-config\" should not be a direct dependency — use the `expo/metro-config` sub-export of the `expo` package",
4893
+ message: "\"@expo/metro-config\" should not be a direct dependency. Expo pins the compatible Metro config, and a direct entry can drift to a version that breaks bundling",
4895
4894
  help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js"
4896
4895
  },
4897
4896
  {
4898
4897
  packageName: "@types/react-native",
4899
4898
  rule: "expo-no-redundant-dependency",
4900
- message: "\"@types/react-native\" should not be installed — React Native ships its own types since SDK 48",
4899
+ message: "\"@types/react-native\" should not be installed. React Native ships its own types since SDK 48, so the extra package can introduce duplicate or stale type definitions",
4901
4900
  help: "Remove `@types/react-native` from your package.json",
4902
4901
  minSdkMajor: 48
4903
4902
  },
4904
4903
  {
4905
4904
  packageName: "@expo/config-plugins",
4906
4905
  rule: "expo-no-redundant-dependency",
4907
- message: "\"@expo/config-plugins\" should not be a direct dependency — use the `expo/config-plugins` sub-export of the `expo` package",
4906
+ message: "\"@expo/config-plugins\" should not be a direct dependency. Expo pins the compatible config-plugin API, and a direct entry can drift to a version that breaks prebuild",
4908
4907
  help: "Remove `@expo/config-plugins`; config-plugin authors should import from `expo/config-plugins`. See https://github.com/expo/expo/pull/18855",
4909
4908
  minSdkMajor: 48
4910
4909
  },
4911
4910
  {
4912
4911
  packageName: "@expo/prebuild-config",
4913
4912
  rule: "expo-no-redundant-dependency",
4914
- message: "\"@expo/prebuild-config\" should not be a direct dependency — Expo installs it transitively",
4913
+ message: "\"@expo/prebuild-config\" should not be a direct dependency. Expo pins the compatible prebuild config, and a direct entry can drift to a version that breaks prebuild",
4915
4914
  help: "Remove `@expo/prebuild-config` from your package.json",
4916
4915
  minSdkMajor: 53
4917
4916
  },
@@ -4925,28 +4924,28 @@ const FLAGGED_DEPENDENCIES = [
4925
4924
  {
4926
4925
  packageName: "expo-app-loading",
4927
4926
  rule: "expo-no-redundant-dependency",
4928
- message: "\"expo-app-loading\" was removed in SDK 49",
4927
+ message: "\"expo-app-loading\" was removed in SDK 49, so keeping it can leave imports unresolved after upgrading Expo",
4929
4928
  help: "Remove `expo-app-loading` and use `expo-splash-screen` instead. See https://docs.expo.dev/versions/latest/sdk/splash-screen/",
4930
4929
  minSdkMajor: 49
4931
4930
  },
4932
4931
  {
4933
4932
  packageName: "expo-firebase-analytics",
4934
4933
  rule: "expo-no-redundant-dependency",
4935
- message: "\"expo-firebase-analytics\" was removed in SDK 48",
4934
+ message: "\"expo-firebase-analytics\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4936
4935
  help: FIREBASE_HELP,
4937
4936
  minSdkMajor: 48
4938
4937
  },
4939
4938
  {
4940
4939
  packageName: "expo-firebase-recaptcha",
4941
4940
  rule: "expo-no-redundant-dependency",
4942
- message: "\"expo-firebase-recaptcha\" was removed in SDK 48",
4941
+ message: "\"expo-firebase-recaptcha\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4943
4942
  help: FIREBASE_HELP,
4944
4943
  minSdkMajor: 48
4945
4944
  },
4946
4945
  {
4947
4946
  packageName: "expo-firebase-core",
4948
4947
  rule: "expo-no-redundant-dependency",
4949
- message: "\"expo-firebase-core\" was removed in SDK 48",
4948
+ message: "\"expo-firebase-core\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4950
4949
  help: FIREBASE_HELP,
4951
4950
  minSdkMajor: 48
4952
4951
  }
@@ -4987,7 +4986,7 @@ const checkExpoGitignore = (context) => {
4987
4986
  }));
4988
4987
  if (findLocalModuleNativeFiles(rootDirectory).find((nativeFilePath) => isPathGitIgnored(rootDirectory, nativeFilePath) === true) !== void 0) diagnostics.push(buildExpoDiagnostic({
4989
4988
  rule: "expo-gitignore",
4990
- message: "The native `ios`/`android` directories of a local Expo module under `modules/` are gitignored — usually caused by an overly broad `ios`/`android` ignore rule",
4989
+ message: "The native `ios`/`android` directories of a local Expo module under `modules/` are gitignored, so required native code can be missing from CI or teammate checkouts.",
4991
4990
  help: "Use anchored patterns like `/ios` and `/android` in .gitignore so only the top-level native directories are excluded, not those inside `modules/`"
4992
4991
  }));
4993
4992
  return diagnostics;
@@ -5049,17 +5048,16 @@ const checkExpoPackageJsonConflicts = (context) => {
5049
5048
  const conflictingScriptNames = CONFLICTING_SCRIPT_NAMES.filter((scriptName) => Boolean(packageJson.scripts?.[scriptName]));
5050
5049
  if (conflictingScriptNames.length > 0) {
5051
5050
  const quotedNames = conflictingScriptNames.map((name) => `"${name}"`).join(", ");
5052
- const shadowsExpoCli = conflictingScriptNames.includes("expo");
5053
5051
  diagnostics.push(buildExpoDiagnostic({
5054
5052
  rule: "expo-package-json-conflict",
5055
- message: `package.json defines ${quotedNames} ${conflictingScriptNames.length === 1 ? "as a script that conflicts" : "as scripts that conflict"} with binaries in node_modules/.bin${shadowsExpoCli ? " — a `expo` script shadows the Expo CLI and will likely cause build failures" : ""}`,
5053
+ message: `package.json defines ${quotedNames} ${conflictingScriptNames.length === 1 ? "as a script that shadows" : "as scripts that shadow"} Expo/React Native binaries in node_modules/.bin, so tooling can run the local script instead of the expected CLI and fail builds.`,
5056
5054
  help: "Rename these scripts so they don't collide with the `expo` / `react-native` binaries"
5057
5055
  }));
5058
5056
  }
5059
5057
  const packageName = packageJson.name;
5060
5058
  if (typeof packageName === "string" && context.directDependencyNames.has(packageName)) diagnostics.push(buildExpoDiagnostic({
5061
5059
  rule: "expo-package-json-conflict",
5062
- message: `package.json "name" is "${packageName}", which collides with a dependency of the same name`,
5060
+ message: `package.json "name" is "${packageName}", which collides with a dependency of the same name, so package self-resolution can shadow the dependency and break imports that expect the installed package.`,
5063
5061
  help: "Rename your package so it no longer matches one of its dependencies"
5064
5062
  }));
5065
5063
  return diagnostics;
@@ -5130,7 +5128,7 @@ const checkExpoRouterReactNavigation = (context) => {
5130
5128
  if (reactNavigationNames.length === 0) return [];
5131
5129
  return [buildExpoDiagnostic({
5132
5130
  rule: "expo-router-no-react-navigation",
5133
- message: `As of SDK 56, expo-router is no longer compatible with react-navigation, but ${reactNavigationNames.map((name) => `"${name}"`).join(", ")} ${reactNavigationNames.length === 1 ? "is" : "are"} installed as direct ${reactNavigationNames.length === 1 ? "dependency" : "dependencies"}`,
5131
+ message: `As of SDK 56, expo-router is no longer compatible with directly installed @react-navigation packages, so keeping ${reactNavigationNames.map((name) => `"${name}"`).join(", ")} can break routing or linking behavior after the SDK upgrade.`,
5134
5132
  help: "Remove these `@react-navigation/*` packages and replace direct imports with their expo-router equivalents. See https://docs.expo.dev/router/migrate/sdk-55-to-56/"
5135
5133
  })];
5136
5134
  };
@@ -5483,7 +5481,9 @@ const highlighter = {
5483
5481
  gray: import_picocolors.default.gray,
5484
5482
  bold: import_picocolors.default.bold
5485
5483
  };
5486
- const computeJsxIncludePaths = (includePaths) => includePaths.length > 0 ? includePaths.filter((filePath) => JSX_FILE_PATTERN.test(filePath)) : void 0;
5484
+ const NEXT_ENTRY_FILE_PATTERN = /^(?:\.\/)?(?:src\/)?(?:middleware|proxy)\.(?:tsx?|jsx?|mts|mjs)$/;
5485
+ const shouldIncludeExplicitLintPath = (filePath, project) => JSX_FILE_PATTERN.test(filePath) || project?.framework === "nextjs" && NEXT_ENTRY_FILE_PATTERN.test(filePath);
5486
+ const computeExplicitLintIncludePaths = (includePaths, project) => includePaths.length > 0 ? includePaths.filter((filePath) => shouldIncludeExplicitLintPath(filePath, project)) : void 0;
5487
5487
  const LINGUIST_ATTRIBUTE_PATTERN = /^linguist-(?:vendored|generated)(?:=([a-zA-Z0-9]+))?$/i;
5488
5488
  const FALSY_VALUES = new Set([
5489
5489
  "false",
@@ -5912,7 +5912,7 @@ const checkDeadCode = async (options) => {
5912
5912
  plugin: DEAD_CODE_PLUGIN,
5913
5913
  rule: "unused-file",
5914
5914
  severity: "warning",
5915
- message: "Unused file — not reachable from any entry point",
5915
+ message: "Unused file is not reachable from any entry point, so it adds maintenance surface without shipping any code.",
5916
5916
  help: "Delete the file if it is truly unreachable, or import it from an entry point.",
5917
5917
  line: 0,
5918
5918
  column: 0,
@@ -5925,7 +5925,7 @@ const checkDeadCode = async (options) => {
5925
5925
  plugin: DEAD_CODE_PLUGIN,
5926
5926
  rule: unusedExport.isTypeOnly ? "unused-type" : "unused-export",
5927
5927
  severity: "warning",
5928
- message: `Unused ${label}: \`${unusedExport.name}\``,
5928
+ message: `Unused ${label}: \`${unusedExport.name}\` is exported but no module imports it, so it expands the public surface and can mislead callers about supported API.`,
5929
5929
  help: "Drop the `export` keyword (or remove the declaration) if no other module uses this symbol.",
5930
5930
  line: unusedExport.line,
5931
5931
  column: unusedExport.column,
@@ -5939,7 +5939,7 @@ const checkDeadCode = async (options) => {
5939
5939
  plugin: DEAD_CODE_PLUGIN,
5940
5940
  rule: unusedDependency.isDevDependency ? "unused-dev-dependency" : "unused-dependency",
5941
5941
  severity: "warning",
5942
- message: `Unused ${label}: \`${unusedDependency.name}\``,
5942
+ message: `Unused ${label}: \`${unusedDependency.name}\` is not imported by the project, so it adds install time and supply-chain surface without being used.`,
5943
5943
  help: "Remove the dependency from package.json if it is genuinely unused.",
5944
5944
  line: 0,
5945
5945
  column: 0,
@@ -5953,7 +5953,7 @@ const checkDeadCode = async (options) => {
5953
5953
  plugin: DEAD_CODE_PLUGIN,
5954
5954
  rule: "circular-dependency",
5955
5955
  severity: "warning",
5956
- message: `Circular import cycle: ${cycle.files.map(toRelative).join(" → ")}`,
5956
+ message: `Circular import cycle: ${cycle.files.map(toRelative).join(" → ")}. Modules in the cycle can observe partially initialized exports, causing order-dependent bugs.`,
5957
5957
  help: "Break the cycle by extracting the shared code into a third module that both files import.",
5958
5958
  line: 0,
5959
5959
  column: 0,
@@ -6036,11 +6036,11 @@ const listSourceFilesViaFilesystem = (rootDirectory) => {
6036
6036
  return filePaths;
6037
6037
  };
6038
6038
  const listSourceFiles = (rootDirectory) => excludeMinifiedFiles(rootDirectory, listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory));
6039
- const resolveLintIncludePaths = (rootDirectory, userConfig) => {
6039
+ const resolveLintIncludePaths = (rootDirectory, userConfig, project) => {
6040
6040
  if (!Array.isArray(userConfig?.ignore?.files) || userConfig.ignore.files.length === 0) return;
6041
6041
  const ignoredPatterns = compileIgnoredFilePatterns(userConfig);
6042
6042
  return listSourceFiles(rootDirectory).filter((filePath) => {
6043
- if (!JSX_FILE_PATTERN.test(filePath)) return false;
6043
+ if (!shouldIncludeExplicitLintPath(filePath, project)) return false;
6044
6044
  return !isFileIgnoredByPatterns(filePath, rootDirectory, ignoredPatterns);
6045
6045
  });
6046
6046
  };
@@ -8392,7 +8392,7 @@ const runInspect = (input, hooks = {}) => Effect.gen(function* () {
8392
8392
  directory: scanDirectory,
8393
8393
  repo
8394
8394
  }).pipe(Effect.orElseSucceed(() => null)) : Effect.succeed(null));
8395
- const lintIncludePaths = (input.skipJsxIncludeFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeJsxIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config);
8395
+ const lintIncludePaths = (input.skipJsxIncludeFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths], project)) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config, project);
8396
8396
  const scannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => path$1.resolve(scanDirectory, relativePath)) : [];
8397
8397
  const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
8398
8398
  const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
@@ -8990,4 +8990,4 @@ const toJsonReport = (result, options) => buildJsonReport({
8990
8990
  export { AmbiguousProjectError, NoReactDependencyError, NotADirectoryError, PackageJsonNotFoundError, ProjectNotFoundError, ReactDoctorError, buildJsonReport, buildJsonReportError, clearCaches, defineConfig, diagnose, filterSourceFiles, getDiffInfo, isProjectDiscoveryError, isReactDoctorError, summarizeDiagnostics, toJsonReport };
8991
8991
 
8992
8992
  //# sourceMappingURL=index.js.map
8993
- //# debugId=03c21420-4548-560c-9a26-8c22558218d8
8993
+ //# debugId=e34a2d72-4bb4-5cc3-a375-1c5dd155f5ce
package/dist/lsp.js CHANGED
@@ -2136,8 +2136,8 @@ const isFile = (filePath) => {
2136
2136
  return false;
2137
2137
  }
2138
2138
  };
2139
- const SOURCE_FILE_PATTERN = /\.(tsx?|jsx?)$/;
2140
- const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.js$/i;
2139
+ const SOURCE_FILE_PATTERN = /\.(tsx?|jsx?|mts|mjs)$/;
2140
+ const GENERATED_BUNDLE_FILE_PATTERN = /\.(iife|umd|global|min)\.m?js$/i;
2141
2141
  const MINIFIED_SNIFF_BYTES = 65536;
2142
2142
  const GIT_LS_FILES_MAX_BUFFER_BYTES = 50 * 1024 * 1024;
2143
2143
  const IGNORED_DIRECTORIES = new Set([
@@ -3376,6 +3376,29 @@ const STAGED_FILES_PROJECT_CONFIG_FILENAMES = [
3376
3376
  "oxlint.json",
3377
3377
  ".oxlintrc.json"
3378
3378
  ];
3379
+ const CONFIG_FINGERPRINT_FILENAMES = [
3380
+ "doctor.config.ts",
3381
+ "doctor.config.mts",
3382
+ "doctor.config.cts",
3383
+ "doctor.config.js",
3384
+ "doctor.config.mjs",
3385
+ "doctor.config.cjs",
3386
+ "doctor.config.json",
3387
+ "doctor.config.jsonc",
3388
+ "react-doctor.config.json",
3389
+ "package.json",
3390
+ "pnpm-workspace.yaml",
3391
+ "tsconfig.json",
3392
+ "tsconfig.base.json",
3393
+ ".oxlintrc.json",
3394
+ ".eslintrc.json",
3395
+ "pnpm-lock.yaml",
3396
+ "package-lock.json",
3397
+ "yarn.lock",
3398
+ "bun.lock",
3399
+ "bun.lockb",
3400
+ ".gitignore"
3401
+ ];
3379
3402
  const OXLINT_OUTPUT_MAX_BYTES = 50 * 1024 * 1024;
3380
3403
  const OXLINT_SPAWN_TIMEOUT_MS = 6e4;
3381
3404
  const DEAD_CODE_WORKER_MAX_OLD_SPACE_MB = 8192;
@@ -3706,7 +3729,6 @@ const LEGACY_RULE_KEY_TO_NATIVE_RULE_KEY = {
3706
3729
  "react/jsx-no-new-function-as-prop": "react-doctor/jsx-no-new-function-as-prop",
3707
3730
  "react/jsx-no-new-object-as-prop": "react-doctor/jsx-no-new-object-as-prop",
3708
3731
  "react/jsx-no-script-url": "react-doctor/jsx-no-script-url",
3709
- "react/jsx-no-target-blank": "react-doctor/jsx-no-target-blank",
3710
3732
  "react/jsx-no-undef": "react-doctor/jsx-no-undef",
3711
3733
  "react/jsx-no-useless-fragment": "react-doctor/jsx-no-useless-fragment",
3712
3734
  "react/jsx-pascal-case": "react-doctor/jsx-pascal-case",
@@ -4804,51 +4826,51 @@ const FLAGGED_DEPENDENCIES = [
4804
4826
  {
4805
4827
  packageName: "expo-modules-autolinking",
4806
4828
  rule: "expo-no-redundant-dependency",
4807
- message: "\"expo-modules-autolinking\" should not be a direct dependency — Expo installs it transitively as needed",
4829
+ message: "\"expo-modules-autolinking\" should not be a direct dependency. Expo pins the compatible version through the SDK, and a direct entry can drift to a version that breaks prebuild, Metro, or native builds",
4808
4830
  help: "Remove `expo-modules-autolinking` from your package.json"
4809
4831
  },
4810
4832
  {
4811
4833
  packageName: "expo-dev-launcher",
4812
4834
  rule: "expo-no-redundant-dependency",
4813
- message: "\"expo-dev-launcher\" should not be a direct dependency — it is pulled in by `expo-dev-client`",
4835
+ message: "\"expo-dev-launcher\" should not be a direct dependency. `expo-dev-client` pins the compatible launcher, and a direct entry can drift to a version that breaks native builds",
4814
4836
  help: "Remove `expo-dev-launcher` and depend on `expo-dev-client` instead"
4815
4837
  },
4816
4838
  {
4817
4839
  packageName: "expo-dev-menu",
4818
4840
  rule: "expo-no-redundant-dependency",
4819
- message: "\"expo-dev-menu\" should not be a direct dependency — it is pulled in by `expo-dev-client`",
4841
+ message: "\"expo-dev-menu\" should not be a direct dependency. `expo-dev-client` pins the compatible dev menu, and a direct entry can drift to a version that breaks native builds",
4820
4842
  help: "Remove `expo-dev-menu` and depend on `expo-dev-client` instead"
4821
4843
  },
4822
4844
  {
4823
4845
  packageName: "expo-modules-core",
4824
4846
  rule: "expo-no-redundant-dependency",
4825
- message: "\"expo-modules-core\" should not be a direct dependency — use the API re-exported from the `expo` package",
4847
+ message: "\"expo-modules-core\" should not be a direct dependency. Expo pins the compatible native core, and a direct entry can drift to a version that breaks prebuild or native builds",
4826
4848
  help: "Remove `expo-modules-core` from your package.json and import from `expo` instead"
4827
4849
  },
4828
4850
  {
4829
4851
  packageName: "@expo/metro-config",
4830
4852
  rule: "expo-no-redundant-dependency",
4831
- message: "\"@expo/metro-config\" should not be a direct dependency — use the `expo/metro-config` sub-export of the `expo` package",
4853
+ message: "\"@expo/metro-config\" should not be a direct dependency. Expo pins the compatible Metro config, and a direct entry can drift to a version that breaks bundling",
4832
4854
  help: "Remove `@expo/metro-config` and import `expo/metro-config` in your metro.config.js"
4833
4855
  },
4834
4856
  {
4835
4857
  packageName: "@types/react-native",
4836
4858
  rule: "expo-no-redundant-dependency",
4837
- message: "\"@types/react-native\" should not be installed — React Native ships its own types since SDK 48",
4859
+ message: "\"@types/react-native\" should not be installed. React Native ships its own types since SDK 48, so the extra package can introduce duplicate or stale type definitions",
4838
4860
  help: "Remove `@types/react-native` from your package.json",
4839
4861
  minSdkMajor: 48
4840
4862
  },
4841
4863
  {
4842
4864
  packageName: "@expo/config-plugins",
4843
4865
  rule: "expo-no-redundant-dependency",
4844
- message: "\"@expo/config-plugins\" should not be a direct dependency — use the `expo/config-plugins` sub-export of the `expo` package",
4866
+ message: "\"@expo/config-plugins\" should not be a direct dependency. Expo pins the compatible config-plugin API, and a direct entry can drift to a version that breaks prebuild",
4845
4867
  help: "Remove `@expo/config-plugins`; config-plugin authors should import from `expo/config-plugins`. See https://github.com/expo/expo/pull/18855",
4846
4868
  minSdkMajor: 48
4847
4869
  },
4848
4870
  {
4849
4871
  packageName: "@expo/prebuild-config",
4850
4872
  rule: "expo-no-redundant-dependency",
4851
- message: "\"@expo/prebuild-config\" should not be a direct dependency — Expo installs it transitively",
4873
+ message: "\"@expo/prebuild-config\" should not be a direct dependency. Expo pins the compatible prebuild config, and a direct entry can drift to a version that breaks prebuild",
4852
4874
  help: "Remove `@expo/prebuild-config` from your package.json",
4853
4875
  minSdkMajor: 53
4854
4876
  },
@@ -4862,28 +4884,28 @@ const FLAGGED_DEPENDENCIES = [
4862
4884
  {
4863
4885
  packageName: "expo-app-loading",
4864
4886
  rule: "expo-no-redundant-dependency",
4865
- message: "\"expo-app-loading\" was removed in SDK 49",
4887
+ message: "\"expo-app-loading\" was removed in SDK 49, so keeping it can leave imports unresolved after upgrading Expo",
4866
4888
  help: "Remove `expo-app-loading` and use `expo-splash-screen` instead. See https://docs.expo.dev/versions/latest/sdk/splash-screen/",
4867
4889
  minSdkMajor: 49
4868
4890
  },
4869
4891
  {
4870
4892
  packageName: "expo-firebase-analytics",
4871
4893
  rule: "expo-no-redundant-dependency",
4872
- message: "\"expo-firebase-analytics\" was removed in SDK 48",
4894
+ message: "\"expo-firebase-analytics\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4873
4895
  help: FIREBASE_HELP,
4874
4896
  minSdkMajor: 48
4875
4897
  },
4876
4898
  {
4877
4899
  packageName: "expo-firebase-recaptcha",
4878
4900
  rule: "expo-no-redundant-dependency",
4879
- message: "\"expo-firebase-recaptcha\" was removed in SDK 48",
4901
+ message: "\"expo-firebase-recaptcha\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4880
4902
  help: FIREBASE_HELP,
4881
4903
  minSdkMajor: 48
4882
4904
  },
4883
4905
  {
4884
4906
  packageName: "expo-firebase-core",
4885
4907
  rule: "expo-no-redundant-dependency",
4886
- message: "\"expo-firebase-core\" was removed in SDK 48",
4908
+ message: "\"expo-firebase-core\" was removed in SDK 48, so keeping it can leave imports unresolved or fail native builds after upgrading Expo",
4887
4909
  help: FIREBASE_HELP,
4888
4910
  minSdkMajor: 48
4889
4911
  }
@@ -4924,7 +4946,7 @@ const checkExpoGitignore = (context) => {
4924
4946
  }));
4925
4947
  if (findLocalModuleNativeFiles(rootDirectory).find((nativeFilePath) => isPathGitIgnored(rootDirectory, nativeFilePath) === true) !== void 0) diagnostics.push(buildExpoDiagnostic({
4926
4948
  rule: "expo-gitignore",
4927
- message: "The native `ios`/`android` directories of a local Expo module under `modules/` are gitignored — usually caused by an overly broad `ios`/`android` ignore rule",
4949
+ message: "The native `ios`/`android` directories of a local Expo module under `modules/` are gitignored, so required native code can be missing from CI or teammate checkouts.",
4928
4950
  help: "Use anchored patterns like `/ios` and `/android` in .gitignore so only the top-level native directories are excluded, not those inside `modules/`"
4929
4951
  }));
4930
4952
  return diagnostics;
@@ -4986,17 +5008,16 @@ const checkExpoPackageJsonConflicts = (context) => {
4986
5008
  const conflictingScriptNames = CONFLICTING_SCRIPT_NAMES.filter((scriptName) => Boolean(packageJson.scripts?.[scriptName]));
4987
5009
  if (conflictingScriptNames.length > 0) {
4988
5010
  const quotedNames = conflictingScriptNames.map((name) => `"${name}"`).join(", ");
4989
- const shadowsExpoCli = conflictingScriptNames.includes("expo");
4990
5011
  diagnostics.push(buildExpoDiagnostic({
4991
5012
  rule: "expo-package-json-conflict",
4992
- message: `package.json defines ${quotedNames} ${conflictingScriptNames.length === 1 ? "as a script that conflicts" : "as scripts that conflict"} with binaries in node_modules/.bin${shadowsExpoCli ? " — a `expo` script shadows the Expo CLI and will likely cause build failures" : ""}`,
5013
+ message: `package.json defines ${quotedNames} ${conflictingScriptNames.length === 1 ? "as a script that shadows" : "as scripts that shadow"} Expo/React Native binaries in node_modules/.bin, so tooling can run the local script instead of the expected CLI and fail builds.`,
4993
5014
  help: "Rename these scripts so they don't collide with the `expo` / `react-native` binaries"
4994
5015
  }));
4995
5016
  }
4996
5017
  const packageName = packageJson.name;
4997
5018
  if (typeof packageName === "string" && context.directDependencyNames.has(packageName)) diagnostics.push(buildExpoDiagnostic({
4998
5019
  rule: "expo-package-json-conflict",
4999
- message: `package.json "name" is "${packageName}", which collides with a dependency of the same name`,
5020
+ message: `package.json "name" is "${packageName}", which collides with a dependency of the same name, so package self-resolution can shadow the dependency and break imports that expect the installed package.`,
5000
5021
  help: "Rename your package so it no longer matches one of its dependencies"
5001
5022
  }));
5002
5023
  return diagnostics;
@@ -5067,7 +5088,7 @@ const checkExpoRouterReactNavigation = (context) => {
5067
5088
  if (reactNavigationNames.length === 0) return [];
5068
5089
  return [buildExpoDiagnostic({
5069
5090
  rule: "expo-router-no-react-navigation",
5070
- message: `As of SDK 56, expo-router is no longer compatible with react-navigation, but ${reactNavigationNames.map((name) => `"${name}"`).join(", ")} ${reactNavigationNames.length === 1 ? "is" : "are"} installed as direct ${reactNavigationNames.length === 1 ? "dependency" : "dependencies"}`,
5091
+ message: `As of SDK 56, expo-router is no longer compatible with directly installed @react-navigation packages, so keeping ${reactNavigationNames.map((name) => `"${name}"`).join(", ")} can break routing or linking behavior after the SDK upgrade.`,
5071
5092
  help: "Remove these `@react-navigation/*` packages and replace direct imports with their expo-router equivalents. See https://docs.expo.dev/router/migrate/sdk-55-to-56/"
5072
5093
  })];
5073
5094
  };
@@ -5420,7 +5441,9 @@ const highlighter = {
5420
5441
  gray: import_picocolors.default.gray,
5421
5442
  bold: import_picocolors.default.bold
5422
5443
  };
5423
- const computeJsxIncludePaths = (includePaths) => includePaths.length > 0 ? includePaths.filter((filePath) => JSX_FILE_PATTERN.test(filePath)) : void 0;
5444
+ const NEXT_ENTRY_FILE_PATTERN = /^(?:\.\/)?(?:src\/)?(?:middleware|proxy)\.(?:tsx?|jsx?|mts|mjs)$/;
5445
+ const shouldIncludeExplicitLintPath = (filePath, project) => JSX_FILE_PATTERN.test(filePath) || project?.framework === "nextjs" && NEXT_ENTRY_FILE_PATTERN.test(filePath);
5446
+ const computeExplicitLintIncludePaths = (includePaths, project) => includePaths.length > 0 ? includePaths.filter((filePath) => shouldIncludeExplicitLintPath(filePath, project)) : void 0;
5424
5447
  const LINGUIST_ATTRIBUTE_PATTERN = /^linguist-(?:vendored|generated)(?:=([a-zA-Z0-9]+))?$/i;
5425
5448
  const FALSY_VALUES = new Set([
5426
5449
  "false",
@@ -5849,7 +5872,7 @@ const checkDeadCode = async (options) => {
5849
5872
  plugin: DEAD_CODE_PLUGIN,
5850
5873
  rule: "unused-file",
5851
5874
  severity: "warning",
5852
- message: "Unused file — not reachable from any entry point",
5875
+ message: "Unused file is not reachable from any entry point, so it adds maintenance surface without shipping any code.",
5853
5876
  help: "Delete the file if it is truly unreachable, or import it from an entry point.",
5854
5877
  line: 0,
5855
5878
  column: 0,
@@ -5862,7 +5885,7 @@ const checkDeadCode = async (options) => {
5862
5885
  plugin: DEAD_CODE_PLUGIN,
5863
5886
  rule: unusedExport.isTypeOnly ? "unused-type" : "unused-export",
5864
5887
  severity: "warning",
5865
- message: `Unused ${label}: \`${unusedExport.name}\``,
5888
+ message: `Unused ${label}: \`${unusedExport.name}\` is exported but no module imports it, so it expands the public surface and can mislead callers about supported API.`,
5866
5889
  help: "Drop the `export` keyword (or remove the declaration) if no other module uses this symbol.",
5867
5890
  line: unusedExport.line,
5868
5891
  column: unusedExport.column,
@@ -5876,7 +5899,7 @@ const checkDeadCode = async (options) => {
5876
5899
  plugin: DEAD_CODE_PLUGIN,
5877
5900
  rule: unusedDependency.isDevDependency ? "unused-dev-dependency" : "unused-dependency",
5878
5901
  severity: "warning",
5879
- message: `Unused ${label}: \`${unusedDependency.name}\``,
5902
+ message: `Unused ${label}: \`${unusedDependency.name}\` is not imported by the project, so it adds install time and supply-chain surface without being used.`,
5880
5903
  help: "Remove the dependency from package.json if it is genuinely unused.",
5881
5904
  line: 0,
5882
5905
  column: 0,
@@ -5890,7 +5913,7 @@ const checkDeadCode = async (options) => {
5890
5913
  plugin: DEAD_CODE_PLUGIN,
5891
5914
  rule: "circular-dependency",
5892
5915
  severity: "warning",
5893
- message: `Circular import cycle: ${cycle.files.map(toRelative).join(" → ")}`,
5916
+ message: `Circular import cycle: ${cycle.files.map(toRelative).join(" → ")}. Modules in the cycle can observe partially initialized exports, causing order-dependent bugs.`,
5894
5917
  help: "Break the cycle by extracting the shared code into a third module that both files import.",
5895
5918
  line: 0,
5896
5919
  column: 0,
@@ -5973,11 +5996,11 @@ const listSourceFilesViaFilesystem = (rootDirectory) => {
5973
5996
  return filePaths;
5974
5997
  };
5975
5998
  const listSourceFiles = (rootDirectory) => excludeMinifiedFiles(rootDirectory, listSourceFilesViaGit(rootDirectory) ?? listSourceFilesViaFilesystem(rootDirectory));
5976
- const resolveLintIncludePaths = (rootDirectory, userConfig) => {
5999
+ const resolveLintIncludePaths = (rootDirectory, userConfig, project) => {
5977
6000
  if (!Array.isArray(userConfig?.ignore?.files) || userConfig.ignore.files.length === 0) return;
5978
6001
  const ignoredPatterns = compileIgnoredFilePatterns(userConfig);
5979
6002
  return listSourceFiles(rootDirectory).filter((filePath) => {
5980
- if (!JSX_FILE_PATTERN.test(filePath)) return false;
6003
+ if (!shouldIncludeExplicitLintPath(filePath, project)) return false;
5981
6004
  return !isFileIgnoredByPatterns(filePath, rootDirectory, ignoredPatterns);
5982
6005
  });
5983
6006
  };
@@ -8329,7 +8352,7 @@ const runInspect = (input, hooks = {}) => Effect.gen(function* () {
8329
8352
  directory: scanDirectory,
8330
8353
  repo
8331
8354
  }).pipe(Effect.orElseSucceed(() => null)) : Effect.succeed(null));
8332
- const lintIncludePaths = (input.skipJsxIncludeFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeJsxIncludePaths([...input.includePaths])) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config);
8355
+ const lintIncludePaths = (input.skipJsxIncludeFilter ? input.includePaths.length > 0 ? [...input.includePaths] : void 0 : computeExplicitLintIncludePaths([...input.includePaths], project)) ?? resolveLintIncludePaths(scanDirectory, resolvedConfig.config, project);
8333
8356
  const scannedFilePaths = input.suppressScanSummary ? (lintIncludePaths ?? (yield* filesService.listSourceFiles(scanDirectory))).map((relativePath) => path$1.resolve(scanDirectory, relativePath)) : [];
8334
8357
  const beforeLint = hooks.beforeLint ?? NO_HOOKS.beforeLint;
8335
8358
  const afterLint = hooks.afterLint ?? NO_HOOKS.afterLint;
@@ -8761,6 +8784,22 @@ const getRuleMetadata = (plugin, rule) => {
8761
8784
  defaultEnabled: definition.defaultEnabled ?? true
8762
8785
  };
8763
8786
  };
8787
+ const computeConfigFingerprint = (projectDirectory, version) => {
8788
+ const parts = [`v=${version}`];
8789
+ let directory = projectDirectory;
8790
+ for (;;) {
8791
+ for (const filename of CONFIG_FINGERPRINT_FILENAMES) try {
8792
+ const stat = fs.statSync(path.join(directory, filename));
8793
+ parts.push(`${directory}/${filename}=${stat.mtimeMs}:${stat.size}`);
8794
+ } catch {
8795
+ continue;
8796
+ }
8797
+ const parent = path.dirname(directory);
8798
+ if (parent === directory) break;
8799
+ directory = parent;
8800
+ }
8801
+ return crypto.createHash("sha1").update(parts.join("|")).digest("hex");
8802
+ };
8764
8803
  //#endregion
8765
8804
  //#region ../language-server/dist/index.js
8766
8805
  /** Display name used in client-facing messages and progress titles. */
@@ -8806,31 +8845,9 @@ const SCANNABLE_EXTENSIONS = [
8806
8845
  ".ts",
8807
8846
  ".tsx",
8808
8847
  ".js",
8809
- ".jsx"
8810
- ];
8811
- /** Filenames whose change invalidates project/config caches. */
8812
- const CONFIG_WATCH_FILENAMES = [
8813
- "doctor.config.ts",
8814
- "doctor.config.mts",
8815
- "doctor.config.cts",
8816
- "doctor.config.js",
8817
- "doctor.config.mjs",
8818
- "doctor.config.cjs",
8819
- "doctor.config.json",
8820
- "doctor.config.jsonc",
8821
- "react-doctor.config.json",
8822
- "package.json",
8823
- "pnpm-workspace.yaml",
8824
- "tsconfig.json",
8825
- "tsconfig.base.json",
8826
- ".oxlintrc.json",
8827
- ".eslintrc.json",
8828
- "pnpm-lock.yaml",
8829
- "package-lock.json",
8830
- "yarn.lock",
8831
- "bun.lock",
8832
- "bun.lockb",
8833
- ".gitignore"
8848
+ ".jsx",
8849
+ ".mts",
8850
+ ".mjs"
8834
8851
  ];
8835
8852
  const SILENT_LOGGER = {
8836
8853
  info: () => {},
@@ -9448,27 +9465,6 @@ const createProjectGraph = (options) => {
9448
9465
  }
9449
9466
  };
9450
9467
  };
9451
- /**
9452
- * Fingerprint of everything (outside file content) that affects lint
9453
- * output for a project: the React Doctor version plus the size + mtime of
9454
- * each config / manifest / lockfile. A change to any of them invalidates
9455
- * the persisted per-file lint cache, since rules, capabilities, adopted
9456
- * configs, and dependency-derived settings all flow from these files.
9457
- */
9458
- const computeConfigFingerprint = (projectDirectory, version) => {
9459
- const parts = [`v=${version}`];
9460
- let directory = projectDirectory;
9461
- for (;;) {
9462
- for (const filename of CONFIG_WATCH_FILENAMES) try {
9463
- const stat = fs.statSync(path.join(directory, filename));
9464
- parts.push(`${directory}/${filename}=${stat.mtimeMs}:${stat.size}`);
9465
- } catch {}
9466
- const parent = path.dirname(directory);
9467
- if (parent === directory) break;
9468
- directory = parent;
9469
- }
9470
- return crypto.createHash("sha1").update(parts.join("|")).digest("hex");
9471
- };
9472
9468
  const resolveCacheFilePath = (projectDirectory) => {
9473
9469
  const nodeModules = path.join(projectDirectory, "node_modules");
9474
9470
  if (fs.existsSync(nodeModules)) return path.join(nodeModules, ".cache", "react-doctor", "lint-cache.json");
@@ -10252,7 +10248,7 @@ const createServer = (connection, options = {}) => {
10252
10248
  };
10253
10249
  });
10254
10250
  connection.onInitialized(() => {
10255
- if (supportsWatchedFileRegistration) connection.client.register(DidChangeWatchedFilesNotification.type, { watchers: [{ globPattern: `**/{${CONFIG_WATCH_FILENAMES.join(",")}}` }, { globPattern: `**/*.{${SCANNABLE_EXTENSIONS.map((extension) => extension.slice(1)).join(",")}}` }] });
10251
+ if (supportsWatchedFileRegistration) connection.client.register(DidChangeWatchedFilesNotification.type, { watchers: [{ globPattern: `**/{${CONFIG_FINGERPRINT_FILENAMES.join(",")}}` }, { globPattern: `**/*.{${SCANNABLE_EXTENSIONS.map((extension) => extension.slice(1)).join(",")}}` }] });
10256
10252
  if (nodeBinaryPath === null) logger.warn(`${SERVER_DISPLAY_NAME}: no Node binary compatible with the oxlint native binding was found; lint will be skipped until you switch to a supported Node version.`);
10257
10253
  if (supportsWorkspaceFolderChange) connection.workspace.onDidChangeWorkspaceFolders((event) => {
10258
10254
  const removedRoots = event.removed.map((folder) => normalizeFsPath(uriToFsPath(folder.uri)));
@@ -10305,7 +10301,7 @@ const createServer = (connection, options = {}) => {
10305
10301
  for (const change of params.changes) {
10306
10302
  const fsPath = uriToFsPath(change.uri);
10307
10303
  const baseName = path.basename(fsPath);
10308
- if (CONFIG_WATCH_FILENAMES.some((watched) => watched === baseName)) {
10304
+ if (CONFIG_FINGERPRINT_FILENAMES.some((watched) => watched === baseName)) {
10309
10305
  configChanged = true;
10310
10306
  continue;
10311
10307
  }
@@ -10854,5 +10850,5 @@ const startLanguageServer = () => {
10854
10850
  };
10855
10851
  //#endregion
10856
10852
  export { startLanguageServer };
10857
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5715b6a9-c2ef-594e-8157-9c81132bc7fe")}catch(e){}}();
10858
- //# debugId=5715b6a9-c2ef-594e-8157-9c81132bc7fe
10853
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6c4ed282-4538-568b-bade-4e4651e27544")}catch(e){}}();
10854
+ //# debugId=6c4ed282-4538-568b-bade-4e4651e27544
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: react-doctor
3
3
  description: Use when finishing a feature, fixing a bug, before committing React code, or when the user types `/doctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.
4
- version: "1.1.0"
4
+ version: "1.2.0"
5
5
  ---
6
6
 
7
7
  # React Doctor
@@ -34,7 +34,7 @@ Pair it with the matching per-rule prompts at `https://www.react.doctor/prompts/
34
34
 
35
35
  ## Configuring or explaining rules
36
36
 
37
- When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code), use the `doctor-explain` skill (alias `/doctor-config`). Start with `npx react-doctor@latest rules explain <rule>`, then apply the narrowest control via `npx react-doctor@latest rules disable|set|category|ignore-tag …`, which edits your `doctor.config.*` (or `package.json#reactDoctor`).
37
+ When the user wants to understand a rule, disagrees with one, or wants to disable / tune which rules run (not fix code), read [references/explain.md](references/explain.md) and follow it. Start with `npx react-doctor@latest rules explain <rule>`, then apply the narrowest control via `npx react-doctor@latest rules disable|set|category|ignore-tag …`, which edits your `doctor.config.*` (or `package.json#reactDoctor`).
38
38
 
39
39
  ## Command
40
40
 
@@ -1,14 +1,11 @@
1
- ---
2
- name: doctor-explain
3
- description: Explain React Doctor rules and configure which ones run via doctor.config.* (or package.json#reactDoctor). Use when the user types `/doctor-explain` or `/doctor-config`, asks why a rule fired, disagrees with a rule, wants to disable/enable a rule, silence a category or tag, tune CI/PR noise, or asks "what does this rule mean". Covers the `react-doctor rules` CLI (list, explain, set, enable, disable, category, ignore-tag) and how config layers combine: ignore.tags disables matching rules before linting, rules over categories sets severity, surfaces controls visibility only.
4
- version: "1.0.0"
5
- ---
1
+ # Explaining and configuring rules
6
2
 
7
- # Doctor Explain
3
+ Explain React Doctor rules and edit `doctor.config.*` safely. Use this when a user
4
+ wants to understand a rule or change which rules run — not for fixing diagnostics
5
+ (that is the main `react-doctor` skill / `/doctor`).
8
6
 
9
- Explains React Doctor rules and edits `doctor.config.*` safely. Use this when a user wants to understand a rule or change which rules run — not for fixing diagnostics (that is the `react-doctor` skill / `/doctor`).
10
-
11
- Triggers: `/doctor-explain`, `/doctor-config`, "why did this rule fire", "I disagree with this rule", "turn this rule off", "stop flagging X", "too noisy", "disable design rules".
7
+ Triggers: "why did this rule fire", "I disagree with this rule", "turn this rule off",
8
+ "stop flagging X", "too noisy", "disable design rules".
12
9
 
13
10
  ## Workflow
14
11