Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
y-hsgw committed Apr 10, 2024
1 parent 9018532 commit fc04de6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rules/jsx-no-bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ module.exports = {
blockVariableNameSets[blockStart][violationType].add(variableName);
}

function getBlockStatementAncestors(node) {
function getBlockStatementAncestors() {
return context.getAncestors().filter(
(ancestor) => ancestor.type === 'BlockStatement'
).reverse();
Expand All @@ -146,7 +146,7 @@ module.exports = {
}

function findVariableViolation(node, name) {
getBlockStatementAncestors(node).find(
getBlockStatementAncestors().find(
(block) => reportVariableViolation(node, name, block.range[0])
);
}
Expand All @@ -157,7 +157,7 @@ module.exports = {
},

FunctionDeclaration(node) {
const blockAncestors = getBlockStatementAncestors(node);
const blockAncestors = getBlockStatementAncestors();
const variableViolationType = getNodeViolationType(node);

if (blockAncestors.length > 0 && variableViolationType) {
Expand All @@ -169,7 +169,7 @@ module.exports = {
if (!node.init) {
return;
}
const blockAncestors = getBlockStatementAncestors(node);
const blockAncestors = getBlockStatementAncestors();
const variableViolationType = getNodeViolationType(node.init);

if (
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ function tagNameHasDot(node) {
);
}

// eslint-disable-next-line valid-jsdoc
/**
* Get the standard name of the attribute.
* @param {String} name - Name of the attribute.
Expand Down

0 comments on commit fc04de6

Please sign in to comment.