mirror of https://github.com/sveltejs/svelte
prevent illegal attribute names at compile time (#4650)
parent
68ac96b8b8
commit
ddfb751fc9
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "illegal-attribute",
|
||||||
|
"message": "'3aa' is not a valid attribute name",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 3,
|
||||||
|
"character": 3
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 12,
|
||||||
|
"character": 12
|
||||||
|
},
|
||||||
|
"pos": 3
|
||||||
|
}]
|
@ -0,0 +1 @@
|
|||||||
|
<p 3aa="abc">Test</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "illegal-attribute",
|
||||||
|
"message": "'a*a' is not a valid attribute name",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 3,
|
||||||
|
"character": 3
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 6,
|
||||||
|
"character": 6
|
||||||
|
},
|
||||||
|
"pos": 3
|
||||||
|
}]
|
@ -0,0 +1 @@
|
|||||||
|
<p a*a>Test</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "illegal-attribute",
|
||||||
|
"message": "'-a' is not a valid attribute name",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 3,
|
||||||
|
"character": 3
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 5,
|
||||||
|
"character": 5
|
||||||
|
},
|
||||||
|
"pos": 3
|
||||||
|
}]
|
@ -0,0 +1 @@
|
|||||||
|
<p -a>Test</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "illegal-attribute",
|
||||||
|
"message": "'a;' is not a valid attribute name",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 3,
|
||||||
|
"character": 3
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 11,
|
||||||
|
"character": 11
|
||||||
|
},
|
||||||
|
"pos": 3
|
||||||
|
}]
|
@ -0,0 +1 @@
|
|||||||
|
<p a;="abc">Test</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "illegal-attribute",
|
||||||
|
"message": "'}' is not a valid attribute name",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 3,
|
||||||
|
"character": 3
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 4,
|
||||||
|
"character": 4
|
||||||
|
},
|
||||||
|
"pos": 3
|
||||||
|
}]
|
@ -0,0 +1 @@
|
|||||||
|
<p }>Test</p>
|
Loading…
Reference in new issue