Skip to content

Commit

Permalink
fix/require-data-selectors-support-TemplateLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
maddhruv committed Feb 18, 2020
1 parent 6c1d538 commit 5c4a5d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/require-data-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function isCallingCyGet (node) {

function isDataArgument (node) {
return node.arguments.length > 0 &&
node.arguments[0].type === 'Literal' &&
(node.arguments[0].type === 'Literal' || node.arguments[0].type === 'TemplateLiteral') &&
String(node.arguments[0].value).startsWith('[data-')

}

0 comments on commit 5c4a5d5

Please sign in to comment.