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: a1e27f431afc692b1b30738443bcfad3c9677568
Pull Request resolved: #30423
  • Loading branch information
mofeiZ committed Jul 23, 2024
1 parent 9d59d39 commit 7a20846
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 7a20846

Please sign in to comment.