Skip to content

Commit e779b00

Browse files
Minor adjustments
1 parent fee8c36 commit e779b00

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/util/Components.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,7 @@ function componentRule(rule, context) {
458458
const node = scope.block;
459459
const isFunction = /Function/.test(node.type); // Functions
460460
const isArrowFunction = astUtil.isArrowFunction(node);
461-
let enclosingScope = scope;
462-
if (isArrowFunction) {
463-
enclosingScope = utils.getArrowFunctionScope(scope);
464-
}
461+
const enclosingScope = isArrowFunction ? utils.getArrowFunctionScope(scope) : scope;
465462
const enclosingScopeParent = enclosingScope && enclosingScope.block.parent;
466463
const isClass = enclosingScope && astUtil.isClass(enclosingScope.block);
467464
const isMethod = enclosingScopeParent && enclosingScopeParent.type === 'MethodDefinition'; // Classes methods

0 commit comments

Comments
 (0)