Skip to content

Commit e2457fa

Browse files
committed
[compiler][eslint] remove compilationMode override; report bailouts on first line
ghstack-source-id: 1870c7a Pull Request resolved: #30423
1 parent f89b733 commit e2457fa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

compiler/packages/eslint-plugin-react-compiler/src/rules/ReactCompilerRule.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ function makeSuggestions(
100100

101101
const COMPILER_OPTIONS: Partial<PluginOptions> = {
102102
noEmit: true,
103-
compilationMode: 'infer',
104103
panicThreshold: 'none',
105104
};
106105

@@ -161,9 +160,16 @@ const rule: Rule.RuleModule = {
161160
detail.loc != null && typeof detail.loc !== 'symbol'
162161
? ` (@:${detail.loc.start.line}:${detail.loc.start.column})`
163162
: '';
163+
const firstLineLoc = {
164+
start: event.fnLoc.start,
165+
end: {
166+
line: event.fnLoc.start.line,
167+
column: 10e3,
168+
},
169+
};
164170
context.report({
165171
message: `[ReactCompilerBailout] ${detail.reason}${locStr}`,
166-
loc: event.fnLoc,
172+
loc: firstLineLoc,
167173
suggest,
168174
});
169175
}

0 commit comments

Comments
 (0)