Skip to content

Commit d2150ee

Browse files
committedMar 30, 2023
fix(top-level-function): narrow warning range
1 parent d3c3e1b commit d2150ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/eslint-plugin-antfu/src/rules/top-level-function.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export default createEslintRule<Options, MessageIds>({
4848
context.report({
4949
node,
5050
loc: {
51-
start: node.loc.start,
52-
end: node.loc.end,
51+
start: id.loc.start,
52+
end: body.loc.start,
5353
},
5454
messageId: 'topLevelFunctionDeclaration',
5555
fix(fixer) {

0 commit comments

Comments
 (0)
Please sign in to comment.