Skip to content

Commit

Permalink
fix: replace missed usage of context.getAncestors
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Sep 6, 2024
1 parent 934f59e commit 0e2ee13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/importDeclaration.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export default function importDeclaration(context) {
const ancestors = context.getAncestors();
import { getAncestors } from 'eslint-module-utils/contextCompat';

export default function importDeclaration(context, node) {
const ancestors = getAncestors(context, node);
return ancestors[ancestors.length - 1];
}

0 comments on commit 0e2ee13

Please sign in to comment.