diff --git a/lib/rules/define-macros-order.js b/lib/rules/define-macros-order.js index 994e4febd..24e7f8085 100644 --- a/lib/rules/define-macros-order.js +++ b/lib/rules/define-macros-order.js @@ -45,7 +45,8 @@ function getTargetStatementPosition(scriptSetup, program) { 'TSInterfaceDeclaration', 'TSTypeAliasDeclaration', 'DebuggerStatement', - 'EmptyStatement' + 'EmptyStatement', + 'ExportNamedDeclaration' ]) for (const [index, item] of program.body.entries()) { diff --git a/tests/lib/rules/define-macros-order.js b/tests/lib/rules/define-macros-order.js index 90e6748d6..ef31450c5 100644 --- a/tests/lib/rules/define-macros-order.js +++ b/tests/lib/rules/define-macros-order.js @@ -106,6 +106,28 @@ tester.run('define-macros-order', rule, { `, options: optionsEmitsFirst + }, + { + filename: 'test.vue', + code: ` + + `, + options: optionsEmitsFirst, + parserOptions: { + parser: require.resolve('@typescript-eslint/parser') + } } ], invalid: [