File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,9 +58,10 @@ module.exports = {
5858 // NOTE: Template literals used as arguments to ID generator functions
5959 // (e.g., WIDGET_IDS.item(`some-${index}`)) are intentionally allowed
6060 // since the widget-scoped ID generators are designed to accept dynamic arguments.
61- // Only flag template literals where all expressions are static literals
62- // (e.g. `${"hello"}-suffix`). Template literals with variable references
63- // (e.g. `${testId}-suffix`) are allowed as they use dynamic IDs.
61+ // Only flag template literals where all interpolated expressions are
62+ // static Literal nodes (e.g. `${"hello"}-suffix`). Template literals
63+ // with Identifier or other non-Literal expressions (e.g. `${testId}-suffix`)
64+ // pass this check and are allowed, since they represent dynamic IDs.
6465 if (
6566 attrValue &&
6667 attrValue . type === 'JSXExpressionContainer' &&
You can’t perform that action at this time.
0 commit comments