mirror of https://github.com/sveltejs/svelte
parent
90d6f573e3
commit
c6c0cbaed9
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: warn on possible implicit snippet shadowing
|
||||
@ -0,0 +1,13 @@
|
||||
<script>
|
||||
import Component from './Component.svelte';
|
||||
import Legacy from './Legacy.svelte';
|
||||
</script>
|
||||
|
||||
<Component children="foo">Children</Component>
|
||||
|
||||
<Component children="foo" />
|
||||
|
||||
<Component children="foo"></Component>
|
||||
|
||||
<!-- svelte-ignore implicit_children_possible_shadowing -->
|
||||
<Legacy children="foo">Legacy</Legacy>
|
||||
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "implicit_children_possible_shadowing",
|
||||
"end": {
|
||||
"column": 46,
|
||||
"line": 6
|
||||
},
|
||||
"message": "if `Component` is using `{@render}` the attribute `children` will shadow the implicit snippet",
|
||||
"start": {
|
||||
"column": 0,
|
||||
"line": 6
|
||||
}
|
||||
}
|
||||
]
|
||||
Loading…
Reference in new issue