From b57d282369b3b3232d8fed537f5aaf0156430d63 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 22 Aug 2024 14:57:01 -0400 Subject: [PATCH] Revert "[compiler][eslint] remove compilationMode override; report bailouts on first line" This reverts commit b34b750729bcbcfd80f72f82f46da5bc3e72158f. This hack doesn't play well internally so I'm reverting this for now (but keeping the compilationMode override). I'll audit the locations we report later and try to make them more accurate so we won't need this workaround. ghstack-source-id: b6be29c11d5e2eae3004ee74cba1b080894c963a Pull Request resolved: https://github.com/facebook/react/pull/30792 --- .../src/rules/ReactCompilerRule.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts b/compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts index 0a0956ebe1db0..f95eaaae007ed 100644 --- a/compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts +++ b/compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts @@ -166,16 +166,9 @@ const rule: Rule.RuleModule = { detail.loc != null && typeof detail.loc !== 'symbol' ? ` (@:${detail.loc.start.line}:${detail.loc.start.column})` : ''; - const firstLineLoc = { - start: event.fnLoc.start, - end: { - line: event.fnLoc.start.line, - column: 10e3, - }, - }; context.report({ message: `[ReactCompilerBailout] ${detail.reason}${locStr}`, - loc: firstLineLoc, + loc: event.fnLoc, suggest, }); }