You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
webmatrixxxl
changed the title
[Bug]: "react/jsx-handler-names" extremely slow?
[Bug]: "react/jsx-handler-names" extremely slow with "checkInlineFunction: true " ?
Nov 29, 2024
webmatrixxxl
changed the title
[Bug]: "react/jsx-handler-names" extremely slow with "checkInlineFunction: true " ?
[Bug]: "react/jsx-handler-names" extremely slow with "checkInlineFunction: true " on a single file?
Nov 29, 2024
That's very strange - the only code in the rule that pivots off of the checkInlineFunction check is either checkInlineFunction && isInlineHandler(node) ? expression.body.callee : expression or || (!checkInlineFunction && isInlineHandler(node)) - and isInlineHandler is just return node.value.expression.type === 'ArrowFunctionExpression';.
Is there a chance that there's one or two files in particular that are slow with this setting, and you could provide the relevant code?
That's very strange - the only code in the rule that pivots off of the checkInlineFunction check is either checkInlineFunction && isInlineHandler(node) ? expression.body.callee : expression or || (!checkInlineFunction && isInlineHandler(node)) - and isInlineHandler is just return node.value.expression.type === 'ArrowFunctionExpression';.
Is there a chance that there's one or two files in particular that are slow with this setting, and you could provide the relevant code?
I just updated the ticket with a link to an example code file: example.js.txt
The problem is observed when we have a lot of inline functions.
Is there an existing issue for this?
Description Overview
==========================================
=> Example JS file to run lint: example.js.txt <=
=========================================
ESlint "react/jsx-handler-names" is extremely slow when
checkInlineFunction: true
on a single file.If I set
checkInlineFunction
tofalse
the rule is not even mentioned in the time report. It is drastically faster.Full ESlint config:
Expected Behavior
It should work normally fast.
eslint-plugin-react version
v7.37.2
eslint version
v8.57.1
node version
v20.15.0
The text was updated successfully, but these errors were encountered: