Skip to content

Commit

Permalink
Stop using deprecated context.getDeclaredVariables() method
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Feb 16, 2024
1 parent 532026a commit e0ec495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/prefer-arrow-callback.js
Expand Up @@ -286,7 +286,7 @@ module.exports = {
}

// Skip recursive functions.
const nameVar = context.getDeclaredVariables(node)[0];
const nameVar = context.sourceCode.getDeclaredVariables(node)[0];

if (isFunctionName(nameVar) && nameVar.references.length > 0) {
return;
Expand Down

0 comments on commit e0ec495

Please sign in to comment.