From e4c301fa97532b4103670dcc259abe34286d1aad Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:36:23 -0700 Subject: [PATCH] fix: remove reactive_declaration_non_reactive_property warning --- .changeset/happy-carpets-jam.md | 5 +++++ packages/svelte/src/compiler/warnings.js | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 .changeset/happy-carpets-jam.md diff --git a/.changeset/happy-carpets-jam.md b/.changeset/happy-carpets-jam.md new file mode 100644 index 0000000000..a9b5f84b64 --- /dev/null +++ b/.changeset/happy-carpets-jam.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: remove `reactive_declaration_non_reactive_property` warning diff --git a/packages/svelte/src/compiler/warnings.js b/packages/svelte/src/compiler/warnings.js index bd28956230..f6ed7de7d5 100644 --- a/packages/svelte/src/compiler/warnings.js +++ b/packages/svelte/src/compiler/warnings.js @@ -102,7 +102,6 @@ export const codes = [ "perf_avoid_nested_class", "reactive_declaration_invalid_placement", "reactive_declaration_module_script_dependency", - "reactive_declaration_non_reactive_property", "state_referenced_locally", "store_rune_conflict", "css_unused_selector", @@ -641,14 +640,6 @@ export function reactive_declaration_module_script_dependency(node) { w(node, "reactive_declaration_module_script_dependency", "Reassignments of module-level declarations will not cause reactive statements to update"); } -/** - * Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update - * @param {null | NodeLike} node - */ -export function reactive_declaration_non_reactive_property(node) { - w(node, "reactive_declaration_non_reactive_property", "Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update"); -} - /** * State referenced in its own scope will never update. Did you mean to reference it inside a closure? * @param {null | NodeLike} node