Skip to content

Commit 6259a7e

Browse files
committed
lint
1 parent 985c43b commit 6259a7e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

packages/svelte/src/internal/client/warnings.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ export function invalid_raw_snippet_render() {
9999
}
100100
}
101101

102+
/**
103+
* Detected a migrated `$:` reactive block that both accesses and updates the same reactive value. This may cause recursive updates when converted to an `$effect`.
104+
*/
105+
export function legacy_recursive_reactive_block() {
106+
if (DEV) {
107+
console.warn(`%c[svelte] legacy_recursive_reactive_block\n%cDetected a migrated \`$:\` reactive block that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \`$effect\`.`, bold, normal);
108+
} else {
109+
// TODO print a link to the documentation
110+
console.warn("legacy_recursive_reactive_block");
111+
}
112+
}
113+
102114
/**
103115
* Tried to unmount a component that was not mounted
104116
*/
@@ -151,16 +163,4 @@ export function state_proxy_equality_mismatch(operator) {
151163
// TODO print a link to the documentation
152164
console.warn("state_proxy_equality_mismatch");
153165
}
154-
}
155-
156-
/**
157-
* Detected a migrated `$:` reactive block that both accesses and updates the same reactive value. This may cause recursive updates when converted to an `$effect`.
158-
*/
159-
export function legacy_recursive_reactive_block() {
160-
if (DEV) {
161-
console.warn(`%c[svelte] legacy_recursive_reactive_block\n%cDetected a migrated \`$:\` reactive block that both accesses and updates the same reactive value. This may cause recursive updates when converted to an \`$effect\`.`, bold, normal);
162-
} else {
163-
// TODO print a link to the documentation
164-
console.warn("legacy_recursive_reactive_block");
165-
}
166166
}

0 commit comments

Comments
 (0)