Skip to content

Commit 4729a3b

Browse files
authored
fix(define-macros-order): skip TSModuleDeclaration statements (#2593)
1 parent 50bde65 commit 4729a3b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: lib/rules/define-macros-order.js

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function isUseStrictStatement(node) {
5353
function getTargetStatementPosition(scriptSetup, program) {
5454
const skipStatements = new Set([
5555
'ImportDeclaration',
56+
'TSModuleDeclaration',
5657
'TSInterfaceDeclaration',
5758
'TSTypeAliasDeclaration',
5859
'DebuggerStatement',

Diff for: tests/lib/rules/define-macros-order.js

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ tester.run('define-macros-order', rule, {
126126
code: `
127127
<script setup lang="ts">
128128
import { bar } from 'foo'
129+
declare global {}
130+
declare namespace Namespace {}
129131
export interface Props {
130132
msg?: string
131133
labels?: string[]

0 commit comments

Comments
 (0)