remove invalid-reactive-var validation as legacy reactive statements are transformed to functions under the hood, which never escape scope - arguably not completely correct, but will be what the user expects anyway

pull/10714/head
Simon Holthausen 3 years ago
parent fa2daf479e
commit 2faae5914b

@ -459,10 +459,6 @@ const errors = {
// message:
// 'Can only bind to an identifier (e.g. `foo`) or a member expression (e.g. `foo.bar` or `foo[baz]`)'
// },
// invalid_var_declaration: {
// code: 'invalid_var_declaration',
// message: '"var" scope should not extend outside the reactive block'
// },
// invalid_style_directive_modifier: /** @param {string} valid */ (valid) => ({
// code: 'invalid-style-directive-modifier',
// message: `Valid modifiers for style directives are: ${valid}`

@ -1,3 +0,0 @@
import { test } from '../../test';
export default test({ skip: true });

@ -1,8 +0,0 @@
[
{
"code": "invalid_var_declaration",
"message": "\"var\" scope should not extend outside the reactive block",
"start": { "line": 14, "column": 7 },
"end": { "line": 14, "column": 16 }
}
]

@ -1,20 +0,0 @@
<script>
var a;
var {a, b: [d, f], c}= {a: 1, b: [1, 2], c: 2};
$: {
function one() {
var a = 'a';
function two() {
var a = 'b';
return a;
}
return two();
}
a = one();
for (var i = 0; i<5; i ++ ) {
// Todo
}
}
</script>
<h1>Hello {a}</h1>

@ -1,3 +0,0 @@
import { test } from '../../test';
export default test({ skip: true });

@ -1,8 +0,0 @@
[
{
"code": "invalid_var_declaration",
"message": "\"var\" scope should not extend outside the reactive block",
"start": { "line": 4, "column": 2 },
"end": { "line": 4, "column": 50 }
}
]

@ -1,8 +0,0 @@
<script>
$: {
let f = 'f';
var {a, b: [c, d], e} = {a: 1, b: [2, 3], e: 4};
}
</script>
<h1>Hello</h1>
Loading…
Cancel
Save