mirror of https://github.com/sveltejs/svelte
feat: error on invalid component name (#12821)
* feat: treat tag with `[` as a component, even if lowercase * chore: simpler regex Co-authored-by: Conduitry <git@chor.date> * feat: error on invalid component name * fix: fully revert dot notation test * tweak error message --------- Co-authored-by: Conduitry <git@chor.date> Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/12931/head
parent
9d9ed33d0c
commit
02c86b1973
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: error on invalid component name
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'component_invalid_name',
|
||||
message: 'Component name must be a valid variable name or dot notation expression',
|
||||
position: [1, 14]
|
||||
}
|
||||
});
|
@ -0,0 +1 @@
|
||||
<Components[1] />
|
Loading…
Reference in new issue