Skip to content

Commit e2c3497

Browse files
committed
Use type assertions
1 parent aa96591 commit e2c3497

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rules/jsx-no-bind.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ module.exports = {
172172
const blockAncestors = getBlockStatementAncestors();
173173
const variableViolationType = getNodeViolationType(node.init);
174174

175+
const nodeParent = /** @type {import("estree").VariableDeclaration} */(node.parent);
175176
if (
176177
blockAncestors.length > 0
177178
&& variableViolationType
178-
&& node.parent.type === 'VariableDeclaration'
179-
&& node.parent.kind === 'const' // only support const right now
179+
&& nodeParent.kind === 'const' // only support const right now
180180
&& node.id.type === 'Identifier'
181181
) {
182182
addVariableNameToSet(

0 commit comments

Comments
 (0)