Skip to content

Commit

Permalink
fix: replace missed usage of context.getScope
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Rath committed Sep 6, 2024
1 parent 8876362 commit 26f5e06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rules/newline-after-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Radek Benkel
*/

import { getPhysicalFilename } from 'eslint-module-utils/contextCompat';
import { getPhysicalFilename, getScope } from 'eslint-module-utils/contextCompat';

import isStaticRequire from '../core/staticRequire';
import docsUrl from '../docsUrl';
Expand Down Expand Up @@ -196,10 +196,10 @@ module.exports = {
},
'Program:exit'() {
log('exit processing for', getPhysicalFilename(context));
const scopeBody = getScopeBody(context.getScope());
log('got scope:', scopeBody);

requireCalls.forEach((node, index) => {
const scopeBody = getScopeBody(getScope(context, node));
log('got scope:', scopeBody);
const nodePosition = findNodeIndexInScopeBody(scopeBody, node);
log('node position in scope:', nodePosition);

Expand Down

0 comments on commit 26f5e06

Please sign in to comment.