You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{component (or @a"b""c")}}{{#let (component (or @a"b""c")) as |A|}}
<A/>
{{{/let}}{{helper (or @a"b""c")}}{{#let (helper (or @a"b""c")) as |A|}}{{A}}{{{/let}}{{modifier (or @a"b""c")}}{{#let (modifier (or @a"b""c")) as |A|}}
<div{{A}} />
{{{/let}}
Check details:
{PathExpression(node,path){if(['modifier','helper','component'].includes(node.original)){constparent=path.parent.node;if(!parent.params.length){return;}consttype=parent.params[0].type;constallowedArgumentTypes=['PathExpression','StringLiteral'];if(!allowedArgumentTypes.includes(type)){constsource=env.syntax.print(parent);console.warn(`${source} is not supported with embroider, move this logic inside js class`);}}}};
Embroider could not find all possible dynamic usecases of dynamic
helper
,modifier
andcomponent
.In scope of this rule, we could highlight it (as warning, for example) to users to simplify migration.
Refs:
embroider-build/embroider#1120 (comment)
Cases to warn:
Check details:
Example:
https://astexplorer.net/#/gist/2509d2732e9e5b05d31a61b2693691e5/9223800e70e87eca3c560ad232d94faa1f8ae523
The text was updated successfully, but these errors were encountered: