Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4729a3b

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

File tree

2 files changed

+3
-0
lines changed
Filter options

2 files changed

+3
-0
lines changed

‎lib/rules/define-macros-order.js

Copy file name to clipboardExpand all lines: lib/rules/define-macros-order.js
+1Lines changed: 1 addition & 0 deletions
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',

‎tests/lib/rules/define-macros-order.js

Copy file name to clipboardExpand all lines: tests/lib/rules/define-macros-order.js
+2Lines changed: 2 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.