We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa96591 commit e2c3497Copy full SHA for e2c3497
lib/rules/jsx-no-bind.js
@@ -172,11 +172,11 @@ module.exports = {
172
const blockAncestors = getBlockStatementAncestors();
173
const variableViolationType = getNodeViolationType(node.init);
174
175
+ const nodeParent = /** @type {import("estree").VariableDeclaration} */(node.parent);
176
if (
177
blockAncestors.length > 0
178
&& variableViolationType
- && node.parent.type === 'VariableDeclaration'
179
- && node.parent.kind === 'const' // only support const right now
+ && nodeParent.kind === 'const' // only support const right now
180
&& node.id.type === 'Identifier'
181
) {
182
addVariableNameToSet(
0 commit comments