File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type { ScopeManager } from "eslint-scope"
77import type { ParseError } from "./errors"
88import type { HasLocation } from "./locations"
99import type { Token } from "./tokens"
10- // eslint-disable-next-line node/no-extraneous-import -- ignore
10+
1111import type { TSESTree } from "@typescript-eslint/utils"
1212
1313//------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -308,6 +308,10 @@ export function parseScriptSetupElements(
308308 }
309309 result . ast . tokens . sort ( ( a , b ) => a . range [ 0 ] - b . range [ 0 ] )
310310 }
311+
312+ if ( result . ast . comments != null ) {
313+ result . ast . comments . sort ( ( a , b ) => a . range [ 0 ] - b . range [ 0 ] )
314+ }
311315 result . ast . body . sort ( ( a , b ) => a . range [ 0 ] - b . range [ 0 ] )
312316
313317 const programStartOffset = result . ast . body . reduce (
You can’t perform that action at this time.
0 commit comments