Skip to content

Commit 8cc5dbd

Browse files
committed
tweak messages, add link to details that will be included on future docs site
1 parent 1ca6619 commit 8cc5dbd

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

packages/svelte/messages/compile-errors/template.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,15 @@ HTML restricts where certain elements can appear. In case of a violation the bro
344344
345345
## svelte_options_invalid_tagname
346346

347-
> Tag name must be two or more words joined by the "-" character
347+
> Tag name must be lowercase and hyphenated
348+
349+
See https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name for more information on valid tag names
348350

349351
## svelte_options_reserved_tagname
350352

351-
> Tag name is reserved and conflicts with standard element names
353+
> Tag name is reserved
354+
355+
See https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name for more information on valid tag names
352356

353357
## svelte_options_unknown_attribute
354358

packages/svelte/src/compiler/errors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,21 +1352,21 @@ export function svelte_options_invalid_customelement_shadow(node) {
13521352
}
13531353

13541354
/**
1355-
* Tag name must be two or more words joined by the "-" character
1355+
* Tag name must be lowercase and hyphenated
13561356
* @param {null | number | NodeLike} node
13571357
* @returns {never}
13581358
*/
13591359
export function svelte_options_invalid_tagname(node) {
1360-
e(node, "svelte_options_invalid_tagname", "Tag name must be two or more words joined by the \"-\" character");
1360+
e(node, "svelte_options_invalid_tagname", "Tag name must be lowercase and hyphenated");
13611361
}
13621362

13631363
/**
1364-
* Tag name is reserved and conflicts with standard element names
1364+
* Tag name is reserved
13651365
* @param {null | number | NodeLike} node
13661366
* @returns {never}
13671367
*/
13681368
export function svelte_options_reserved_tagname(node) {
1369-
e(node, "svelte_options_reserved_tagname", "Tag name is reserved and conflicts with standard element names");
1369+
e(node, "svelte_options_reserved_tagname", "Tag name is reserved");
13701370
}
13711371

13721372
/**

packages/svelte/tests/validator/samples/tag-invalid/errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"code": "svelte_options_invalid_tagname",
4-
"message": "Tag name must be two or more words joined by the \"-\" character",
4+
"message": "Tag name must be lowercase and hyphenated",
55
"start": {
66
"line": 1,
77
"column": 16

packages/svelte/tests/validator/samples/tag-reserved/errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"code": "svelte_options_reserved_tagname",
4-
"message": "Tag name is reserved and conflicts with standard element names",
4+
"message": "Tag name is reserved",
55
"start": {
66
"line": 1,
77
"column": 16

0 commit comments

Comments
 (0)