Skip to content

Commit 5fcbae5

Browse files
committed
remove it
1 parent 83f879d commit 5fcbae5

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

packages/svelte/messages/compile-warnings/script.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
> Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead.
88
9-
## non_reactive_update
10-
11-
> `%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
12-
139
## perf_avoid_inline_class
1410

1511
> Avoid 'new class' — instead, declare the class at the top level scope

packages/svelte/src/compiler/phases/2-analyze/visitors/MemberExpression.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,5 @@ export function MemberExpression(node, context) {
2525
context.state.analysis.needs_context = true;
2626
}
2727

28-
if (context.state.reactive_statement) {
29-
const left = object(node);
30-
31-
if (left !== null) {
32-
const binding = context.state.scope.get(left.name);
33-
34-
if (binding && binding.kind === 'normal') {
35-
const parent = /** @type {Node} */ (context.path.at(-1));
36-
37-
if (
38-
binding.scope === context.state.analysis.module.scope ||
39-
binding.declaration_kind === 'import' ||
40-
(binding.initial &&
41-
binding.initial.type !== 'ArrayExpression' &&
42-
binding.initial.type !== 'ObjectExpression' &&
43-
binding.scope.function_depth <= 1)
44-
) {
45-
if (parent.type !== 'MemberExpression' && parent.type !== 'CallExpression') {
46-
w.reactive_declaration_non_reactive_property(node);
47-
}
48-
}
49-
}
50-
}
51-
}
52-
5328
context.next();
5429
}

packages/svelte/src/compiler/warnings.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,14 +641,6 @@ export function reactive_declaration_module_script_dependency(node) {
641641
w(node, "reactive_declaration_module_script_dependency", "Reassignments of module-level declarations will not cause reactive statements to update");
642642
}
643643

644-
/**
645-
* Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
646-
* @param {null | NodeLike} node
647-
*/
648-
export function reactive_declaration_non_reactive_property(node) {
649-
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");
650-
}
651-
652644
/**
653645
* State referenced in its own scope will never update. Did you mean to reference it inside a closure?
654646
* @param {null | NodeLike} node

0 commit comments

Comments
 (0)