@@ -896,6 +896,9 @@ export const validation_runes_js = {
896896		} 
897897	} , 
898898	CallExpression ( node ,  {  state,  path } )  { 
899+ 		if  ( get_rune ( node ,  state . scope )  ===  '$host' )  { 
900+ 			error ( node ,  'invalid-host-location' ) ; 
901+ 		} 
899902		validate_call_expression ( node ,  state . scope ,  path ) ; 
900903	} , 
901904	VariableDeclarator ( node ,  {  state } )  { 
@@ -1063,9 +1066,17 @@ export const validation_runes = merge(validation, a11y_validators, {
10631066		} 
10641067	} , 
10651068	CallExpression ( node ,  {  state,  path } )  { 
1066- 		if  ( get_rune ( node ,  state . scope )  ===  '$bindable'  &&  node . arguments . length  >  1 )  { 
1069+ 		const  rune  =  get_rune ( node ,  state . scope ) ; 
1070+ 		if  ( rune  ===  '$bindable'  &&  node . arguments . length  >  1 )  { 
10671071			error ( node ,  'invalid-rune-args-length' ,  '$bindable' ,  [ 0 ,  1 ] ) ; 
1072+ 		}  else  if  ( rune  ===  '$host' )  { 
1073+ 			if  ( node . arguments . length  >  0 )  { 
1074+ 				error ( node ,  'invalid-rune-args-length' ,  '$host' ,  [ 0 ] ) ; 
1075+ 			}  else  if  ( state . ast_type  ===  'module'  ||  ! state . analysis . custom_element )  { 
1076+ 				error ( node ,  'invalid-host-location' ) ; 
1077+ 			} 
10681078		} 
1079+ 
10691080		validate_call_expression ( node ,  state . scope ,  path ) ; 
10701081	} , 
10711082	EachBlock ( node ,  {  next,  state } )  { 
0 commit comments