File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
66
77## Unreleased
88
9+ ### Changed
10+ * [ Refactor] [ ` destructuring-assignment ` ] : use ` getParentStatelessComponent ` ([ #3835 ] [ ] @golopot )
11+
12+ [ #3835 ] : https://github.com/jsx-eslint/eslint-plugin-react/pull/3835
13+
914## [ 7.37.1] - 2024.10.01
1015
1116### Fixed
Original file line number Diff line number Diff line change @@ -196,12 +196,7 @@ module.exports = {
196196 'FunctionExpression:exit' : handleStatelessComponentExit ,
197197
198198 MemberExpression ( node ) {
199- let scope = getScope ( context , node ) ;
200- let SFCComponent = components . get ( scope . block ) ;
201- while ( ! SFCComponent && scope . upper && scope . upper !== scope ) {
202- SFCComponent = components . get ( scope . upper . block ) ;
203- scope = scope . upper ;
204- }
199+ const SFCComponent = utils . getParentStatelessComponent ( node ) ;
205200 if ( SFCComponent ) {
206201 handleSFCUsage ( node ) ;
207202 }
You can’t perform that action at this time.
0 commit comments