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
Lauren Tan committed
Aug 22, 2024 at 14:57 UTC
b57d282369b3b3232d8fed537f5aaf0156430d63
1 file changed
+1
-8
compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts
+1
-8
@@ -166,16 +166,9 @@ const rule: Rule.RuleModule = {
166
detail.loc != null && typeof detail.loc !== 'symbol'
167
? ` (@:${detail.loc.start.line}:${detail.loc.start.column})`
168
: '';
169
- const firstLineLoc = {
170
- start: event.fnLoc.start,
171
- end: {
172
- line: event.fnLoc.start.line,
173
- column: 10e3,
174
- },
175
- };
169
context.report({
170
message: `[ReactCompilerBailout] ${detail.reason}${locStr}`,
178
- loc: firstLineLoc,
171
+ loc: event.fnLoc,
172
suggest,
173
});
174
}