Skip to content

Commit

Permalink
chore: fix failing format linting (#9338)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Oct 19, 2023
1 parent 4b91104 commit 28d6b34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function invalidate(renderer, scope, node, names, main_execution_context
if (
node.type === 'AssignmentExpression' &&
node.operator === '=' &&
nodes_match(node.left, node.right, ['trailingComments','leadingComments']) &&
nodes_match(node.left, node.right, ['trailingComments', 'leadingComments']) &&
tail.length === 0
) {
return get_invalidated(head, node);
Expand Down
10 changes: 7 additions & 3 deletions packages/svelte/src/compiler/utils/nodes_match.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function nodes_match(a, b, ignoreKeys=[]) {
export function nodes_match(a, b, ignoreKeys = []) {
if (!!a !== !!b) return false;
if (Array.isArray(a) !== Array.isArray(b)) return false;

Expand All @@ -8,8 +8,12 @@ export function nodes_match(a, b, ignoreKeys=[]) {
return a.every((child, i) => nodes_match(child, b[i]));
}

const a_keys = Object.keys(a).sort().filter(key => !ignoreKeys.includes(key));
const b_keys = Object.keys(b).sort().filter(key => !ignoreKeys.includes(key));
const a_keys = Object.keys(a)
.sort()
.filter((key) => !ignoreKeys.includes(key));
const b_keys = Object.keys(b)
.sort()
.filter((key) => !ignoreKeys.includes(key));

if (a_keys.length !== b_keys.length) return false;

Expand Down
2 changes: 1 addition & 1 deletion sites/svelte.dev/src/app.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" class="theme-default typo-default">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion sites/svelte.dev/src/routes/(authed)/+layout.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as session from '$lib/db/session';

/** @type {import('@sveltejs/adapter-vercel').Config} */
export const config = {
runtime: 'nodejs18.x' // see https://github.com/sveltejs/svelte/pull/9136
runtime: 'nodejs18.x' // see https://github.com/sveltejs/svelte/pull/9136
};

export async function load({ request }) {
Expand Down

0 comments on commit 28d6b34

Please sign in to comment.