Skip to content

Commit

Permalink
[compiler][eslint] remove compilationMode override; report bailouts o…
Browse files Browse the repository at this point in the history
…n first line

ghstack-source-id: 1870c7aa09d455bea89171b77468baeef5b3a63b
Pull Request resolved: #30423
  • Loading branch information
mofeiZ committed Jul 23, 2024
1 parent 50640a1 commit b34b750
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ function makeSuggestions(

const COMPILER_OPTIONS: Partial<PluginOptions> = {
noEmit: true,
compilationMode: 'infer',
panicThreshold: 'none',
};

Expand Down Expand Up @@ -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,
});
}
Expand Down

0 comments on commit b34b750

Please sign in to comment.