@ -210,8 +210,8 @@ export function cyclical_reactive_declaration(node, cycle) {
* @ param { string } name
* @ returns { never }
* /
export function unclosed_element ( node , name ) {
e ( node , " unclosed_element ", ` \` < ${ name } > \` was left open ` ) ;
export function element_ unclosed( node , name ) {
e ( node , " element_ unclosed", ` \` < ${ name } > \` was left open ` ) ;
}
/ * *
@ -219,8 +219,8 @@ export function unclosed_element(node, name) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function unclosed_block ( node ) {
e ( node , " unclosed_block ", "Block was left open" ) ;
export function block_ unclosed( node ) {
e ( node , " block_ unclosed", "Block was left open" ) ;
}
/ * *
@ -228,8 +228,8 @@ export function unclosed_block(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function unexpected_block _close ( node ) {
e ( node , " unexpected_block _close", "Unexpected block closing tag" ) ;
export function block_ unexpected_close ( node ) {
e ( node , " block_ unexpected_close", "Unexpected block closing tag" ) ;
}
/ * *
@ -276,8 +276,8 @@ export function unexpected_reserved_word(node, word) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function missing _whitespace ( node ) {
e ( node , " missing _whitespace", "Expected whitespace" ) ;
export function expected _whitespace ( node ) {
e ( node , " expected _whitespace", "Expected whitespace" ) ;
}
/ * *
@ -294,8 +294,8 @@ export function expected_pattern(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_script _context ( node ) {
e ( node , " invalid_script _context", "If the context attribute is supplied, its value must be \"module\"" ) ;
export function script_ invalid_context ( node ) {
e ( node , " script_ invalid_context", "If the context attribute is supplied, its value must be \"module\"" ) ;
}
/ * *
@ -303,8 +303,8 @@ export function invalid_script_context(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_elseif ( node ) {
e ( node , " invalid_elseif", "'elseif' should be 'else if'" ) ;
export function block_ invalid_elseif ( node ) {
e ( node , " block_ invalid_elseif", "'elseif' should be 'else if'" ) ;
}
/ * *
@ -312,19 +312,8 @@ export function invalid_elseif(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _continuing _block _placement ( node ) {
e ( node , "invalid_continuing_block_placement" , "{:...} block is invalid at this position (did you forget to close the preceeding element or block?)" ) ;
}
/ * *
* % child % block must be a child of % parent %
* @ param { null | number | NodeLike } node
* @ param { string } child
* @ param { string } parent
* @ returns { never }
* /
export function invalid _block _missing _parent ( node , child , parent ) {
e ( node , "invalid_block_missing_parent" , ` ${ child } block must be a child of ${ parent } ` ) ;
export function block _invalid _continuation _placement ( node ) {
e ( node , "block_invalid_continuation_placement" , "{:...} block is invalid at this position (did you forget to close the preceeding element or block?)" ) ;
}
/ * *
@ -333,8 +322,8 @@ export function invalid_block_missing_parent(node, child, parent) {
* @ param { string } name
* @ returns { never }
* /
export function duplicate_block _part ( node , name ) {
e ( node , " duplicate_block_part ", ` ${ name } cannot appear more than once within a block ` ) ;
export function block_duplicate _clause ( node , name ) {
e ( node , " block_duplicate_clause ", ` ${ name } cannot appear more than once within a block ` ) ;
}
/ * *
@ -360,8 +349,8 @@ export function expected_identifier(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_debug ( node ) {
e ( node , " invalid_debug ", "{@debug ...} arguments must be identifiers, not arbitrary expressions" ) ;
export function debug_tag _invalid _arguments ( node ) {
e ( node , " debug_tag_invalid_arguments ", "{@debug ...} arguments must be identifiers, not arbitrary expressions" ) ;
}
/ * *
@ -369,8 +358,8 @@ export function invalid_debug(node) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_const ( node ) {
e ( node , " invalid_const ", "{@const ...} must be an assignment" ) ;
export function const_tag _invalid _expression ( node ) {
e ( node , " const_tag_invalid_expression ", "{@const ...} must be an assignment" ) ;
}
/ * *
@ -380,8 +369,8 @@ export function invalid_const(node) {
* @ param { string } location
* @ returns { never }
* /
export function invalid_block _placement ( node , name , location ) {
e ( node , " invalid_block _placement", ` {# ${ name } ...} block cannot be ${ location } ` ) ;
export function block_ invalid_placement ( node , name , location ) {
e ( node , " block_ invalid_placement", ` {# ${ name } ...} block cannot be ${ location } ` ) ;
}
/ * *
@ -391,8 +380,8 @@ export function invalid_block_placement(node, name, location) {
* @ param { string } location
* @ returns { never }
* /
export function invalid_tag _placement ( node , name , location ) {
e ( node , " invalid_tag _placement", ` {@ ${ name } ...} tag cannot be ${ location } ` ) ;
export function tag_ invalid_placement ( node , name , location ) {
e ( node , " tag_ invalid_placement", ` {@ ${ name } ...} tag cannot be ${ location } ` ) ;
}
/ * *
@ -400,18 +389,8 @@ export function invalid_tag_placement(node, name, location) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function missing _attribute _value ( node ) {
e ( node , "missing_attribute_value" , "Expected attribute value" ) ;
}
/ * *
* Expected closing % delimiter % character
* @ param { null | number | NodeLike } node
* @ param { string } delimiter
* @ returns { never }
* /
export function unclosed _attribute _value ( node , delimiter ) {
e ( node , "unclosed_attribute_value" , ` Expected closing ${ delimiter } character ` ) ;
export function expected _attribute _value ( node ) {
e ( node , "expected_attribute_value" , "Expected attribute value" ) ;
}
/ * *
@ -419,18 +398,18 @@ export function unclosed_attribute_value(node, delimiter) {
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid_ directive_value ( node ) {
e ( node , " invalid_ directive_value", "Directive value must be a JavaScript expression enclosed in curly braces" ) ;
export function directive_invalid _value ( node ) {
e ( node , " directive_invalid _value", "Directive value must be a JavaScript expression enclosed in curly braces" ) ;
}
/ * *
* % type % name cannot be empty
* ` %type% ` name cannot be empty
* @ param { null | number | NodeLike } node
* @ param { string } type
* @ returns { never }
* /
export function empty_ directive_name ( node , type ) {
e ( node , " empty_ directive_name", ` ${ type } name cannot be empty ` ) ;
export function directive_missing _name ( node , type ) {
e ( node , " directive_missing_ name", ` \` ${ type } \` name cannot be empty ` ) ;
}
/ * *
@ -777,80 +756,6 @@ export function conflicting_property_name(node) {
e ( node , "conflicting_property_name" , "Cannot have a property and a component export with the same name" ) ;
}
/ * *
* ` <slot> ` can only receive attributes and ( optionally ) let directives
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _slot _element _attribute ( node ) {
e ( node , "invalid_slot_element_attribute" , "`<slot>` can only receive attributes and (optionally) let directives" ) ;
}
/ * *
* slot attribute must be a static value
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _slot _attribute ( node ) {
e ( node , "invalid_slot_attribute" , "slot attribute must be a static value" ) ;
}
/ * *
* ` default ` is a reserved word — it cannot be used as a slot name
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _slot _name _default ( node ) {
e ( node , "invalid_slot_name_default" , "`default` is a reserved word — it cannot be used as a slot name" ) ;
}
/ * *
* slot attribute must be a static value
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _slot _name ( node ) {
e ( node , "invalid_slot_name" , "slot attribute must be a static value" ) ;
}
/ * *
* Element with a slot = '...' attribute must be a child of a component or a descendant of a custom element
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _slot _placement ( node ) {
e ( node , "invalid_slot_placement" , "Element with a slot='...' attribute must be a child of a component or a descendant of a custom element" ) ;
}
/ * *
* Duplicate slot name '%name%' in < % component % >
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ param { string } component
* @ returns { never }
* /
export function duplicate _slot _name ( node , name , component ) {
e ( node , "duplicate_slot_name" , ` Duplicate slot name ' ${ name } ' in < ${ component } > ` ) ;
}
/ * *
* Found default slot content alongside an explicit slot = "default"
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function invalid _default _slot _content ( node ) {
e ( node , "invalid_default_slot_content" , "Found default slot content alongside an explicit slot=\"default\"" ) ;
}
/ * *
* Cannot use explicit children snippet at the same time as implicit children content . Remove either the non - whitespace content or the children snippet block
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function conflicting _children _snippet ( node ) {
e ( node , "conflicting_children_snippet" , "Cannot use explicit children snippet at the same time as implicit children content. Remove either the non-whitespace content or the children snippet block" ) ;
}
/ * *
* An element that uses the ` animate: ` directive must be the only child of a keyed ` {#each ...} ` block
* @ param { null | number | NodeLike } node
@ -1077,6 +982,71 @@ export function node_invalid_placement(node, thing, parent) {
e ( node , "node_invalid_placement" , ` ${ thing } is invalid inside < ${ parent } > ` ) ;
}
/ * *
* slot attribute must be a static value
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _attribute _invalid ( node ) {
e ( node , "slot_attribute_invalid" , "slot attribute must be a static value" ) ;
}
/ * *
* Element with a slot = '...' attribute must be a child of a component or a descendant of a custom element
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _attribute _invalid _placement ( node ) {
e ( node , "slot_attribute_invalid_placement" , "Element with a slot='...' attribute must be a child of a component or a descendant of a custom element" ) ;
}
/ * *
* ` <slot> ` can only receive attributes and ( optionally ) let directives
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _element _invalid _attribute ( node ) {
e ( node , "slot_element_invalid_attribute" , "`<slot>` can only receive attributes and (optionally) let directives" ) ;
}
/ * *
* slot attribute must be a static value
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _element _invalid _name ( node ) {
e ( node , "slot_element_invalid_name" , "slot attribute must be a static value" ) ;
}
/ * *
* ` default ` is a reserved word — it cannot be used as a slot name
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _element _invalid _name _default ( node ) {
e ( node , "slot_element_invalid_name_default" , "`default` is a reserved word — it cannot be used as a slot name" ) ;
}
/ * *
* Duplicate slot name '%name%' in < % component % >
* @ param { null | number | NodeLike } node
* @ param { string } name
* @ param { string } component
* @ returns { never }
* /
export function slot _attribute _duplicate ( node , name , component ) {
e ( node , "slot_attribute_duplicate" , ` Duplicate slot name ' ${ name } ' in < ${ component } > ` ) ;
}
/ * *
* Found default slot content alongside an explicit slot = "default"
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function slot _default _duplicate ( node ) {
e ( node , "slot_default_duplicate" , "Found default slot content alongside an explicit slot=\"default\"" ) ;
}
/ * *
* Cannot use ` <slot> ` syntax and ` {@render ...} ` tags in the same component . Migrate towards ` {@render ...} ` tags completely .
* @ param { null | number | NodeLike } node
@ -1086,6 +1056,15 @@ export function slot_snippet_conflict(node) {
e ( node , "slot_snippet_conflict" , "Cannot use `<slot>` syntax and `{@render ...}` tags in the same component. Migrate towards `{@render ...}` tags completely." ) ;
}
/ * *
* Cannot use explicit children snippet at the same time as implicit children content . Remove either the non - whitespace content or the children snippet block
* @ param { null | number | NodeLike } node
* @ returns { never }
* /
export function snippet _conflict ( node ) {
e ( node , "snippet_conflict" , "Cannot use explicit children snippet at the same time as implicit children content. Remove either the non-whitespace content or the children snippet block" ) ;
}
/ * *
* ` style: ` directive can only use the ` important ` modifier
* @ param { null | number | NodeLike } node