From 6ca06054353331072bb4a4ff2b06ac5c8bfcd80b Mon Sep 17 00:00:00 2001 From: Nic <162764842+Nic-Polumeyv@users.noreply.github.com> Date: Sat, 12 Sep 2026 20:35:36 -0400 Subject: [PATCH] fmt --- packages/svelte/src/compiler/phases/1-parse/index.js | 9 ++++++--- packages/svelte/src/compiler/phases/scope.js | 10 +++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/svelte/src/compiler/phases/1-parse/index.js b/packages/svelte/src/compiler/phases/1-parse/index.js index de959ba755..523aa210df 100644 --- a/packages/svelte/src/compiler/phases/1-parse/index.js +++ b/packages/svelte/src/compiler/phases/1-parse/index.js @@ -145,7 +145,10 @@ export function parse(template, loose = false, erase = false) { new Finish(trimmed).root(root); // a comment between attributes is kept whole, one in JavaScript loses its line's indentation - const spans = roots.map(({ node }) => [/** @type {number} */ (node.start), /** @type {number} */ (node.end)]); + const spans = roots.map(({ node }) => [ + /** @type {number} */ (node.start), + /** @type {number} */ (node.end) + ]); for (const comment of root.comments) { if (spans.some(([start, end]) => comment.start >= start && comment.end <= end)) dedent(comment, trimmed); @@ -323,7 +326,8 @@ class Finish { this.expression(node, node.expression); return; case 'RenderTag': { - const call = node.expression.type === 'ChainExpression' ? node.expression.expression : node.expression; + const call = + node.expression.type === 'ChainExpression' ? node.expression.expression : node.expression; if (call.type !== 'CallExpression') e.render_tag_invalid_expression(node.expression); this.expression(node, node.expression); node.metadata = { @@ -487,7 +491,6 @@ class Finish { `` ); } - } /** diff --git a/packages/svelte/src/compiler/phases/scope.js b/packages/svelte/src/compiler/phases/scope.js index c47a7d2a50..5652c63c91 100644 --- a/packages/svelte/src/compiler/phases/scope.js +++ b/packages/svelte/src/compiler/phases/scope.js @@ -1198,12 +1198,7 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) { let found = outermost; for (const parsed of answer.scopes) { const node = /** @type {any} */ (parsed.node); - if ( - node && - node.start <= position && - position < node.end && - ours.has(parsed) - ) { + if (node && node.start <= position && position < node.end && ours.has(parsed)) { // a fragment has no span of its own: anything inside it is closer const current = /** @type {any} */ (found.node); if (!current || current.start === undefined || node.start >= current.start) @@ -1537,7 +1532,8 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) { for (const param of node.parameters) { const params = tables_of(param); - if (params !== undefined) from_tables(child_scope, params, [...context.path, node], false); + if (params !== undefined) + from_tables(child_scope, params, [...context.path, node], false); } for (const child of node.body.nodes) { context.visit(child, { scope: child_scope });