[compiler][eslint] remove compilationMode override; report bailouts on first line

ghstack-source-id: 1870c7aa09
Pull Request resolved: https://github.com/facebook/react/pull/30423
This commit is contained in:
Mofei Zhang
2024-07-23 14:24:36 -04:00
parent 50640a1b88
commit b34b750729
@@ -100,7 +100,6 @@ function makeSuggestions(
const COMPILER_OPTIONS: Partial<PluginOptions> = {
noEmit: true,
compilationMode: 'infer',
panicThreshold: 'none',
};
@@ -161,9 +160,16 @@ 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: event.fnLoc,
loc: firstLineLoc,
suggest,
});
}