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-poisoned]
  • Loading branch information
mofeiZ committed Jul 22, 2024
1 parent 768aad3 commit 686b477
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 686b477

Please sign in to comment.