fix(top-level-function): narrow warning range

This commit is contained in:
Anthony Fu 2023-03-30 11:02:49 +02:00
parent d3c3e1b84d
commit d2150eec3b

View File

@ -48,8 +48,8 @@ export default createEslintRule<Options, MessageIds>({
context.report({
node,
loc: {
start: node.loc.start,
end: node.loc.end,
start: id.loc.start,
end: body.loc.start,
},
messageId: 'topLevelFunctionDeclaration',
fix(fixer) {