From 4341f0ca7fb57bb5011bf713fc3ec51c1caa61c7 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Wed, 27 Aug 2025 11:05:32 -0700 Subject: [PATCH] Require error code in suppressions, and kill $FlowIssue and $FlowIgnore in react-native Summary: Changelog: [Internal] Differential Revision: D81150232 --- .flowconfig | 3 ++- packages/debugger-shell/src/node/index.flow.js | 2 +- packages/debugger-shell/src/node/private/LaunchUtils.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.flowconfig b/.flowconfig index 23ce5c8c5d6c..672f420a1498 100644 --- a/.flowconfig +++ b/.flowconfig @@ -75,7 +75,8 @@ module.system.haste.module_ref_prefix=m# react.runtime=automatic -experimental.error_code_migration=new +experimental.only_support_flow_fixme_and_expected_error=true +experimental.require_suppression_with_error_code=true ban_spread_key_props=true diff --git a/packages/debugger-shell/src/node/index.flow.js b/packages/debugger-shell/src/node/index.flow.js index 8490b8f42ed4..06ba4a9eab67 100644 --- a/packages/debugger-shell/src/node/index.flow.js +++ b/packages/debugger-shell/src/node/index.flow.js @@ -153,7 +153,7 @@ function getShellBinaryAndArgs( switch (flavor) { case 'prebuilt': return [ - // $FlowIssue[cannot-resolve-module] fb-dotslash includes Flow types but Flow does not pick them up + // $FlowFixMe[cannot-resolve-module] fb-dotslash includes Flow types but Flow does not pick them up require('fb-dotslash'), [DEVTOOLS_BINARY_DOTSLASH_FILE], ]; diff --git a/packages/debugger-shell/src/node/private/LaunchUtils.js b/packages/debugger-shell/src/node/private/LaunchUtils.js index 283d284058aa..f73b36201498 100644 --- a/packages/debugger-shell/src/node/private/LaunchUtils.js +++ b/packages/debugger-shell/src/node/private/LaunchUtils.js @@ -45,7 +45,7 @@ async function prepareDebuggerShellFromDotSlashFile( filePath: string, ): Promise { const {code, stderr} = await spawnAndGetStderr( - // $FlowIssue[cannot-resolve-module] fb-dotslash includes Flow types but Flow does not pick them up + // $FlowFixMe[cannot-resolve-module] fb-dotslash includes Flow types but Flow does not pick them up require('fb-dotslash'), ['--', 'fetch', filePath], );