Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix failing format linting #9338

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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