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
This works fine on no-restricted-syntax, but fails on vue/no-restriceted-syntax.
To reproduce, add the following test case to the no-restricted-syntax test:
{
code: `
<template>
<input :value="interpolate(foo, bar, true)">
</template>`,
options: [
{
'selector': 'CallExpression > :nth-child(3)[value!=true]',
'message': 'Third argument of interpolate must be true'
}
]
}
What did you expect to happen?
Test would pass
What actually happened?
Test failed:
TypeError: Cannot read property 'length' of undefined
Occurred while linting <input>:1
at nthChild (node_modules/esquery/esquery.js:256:34)
at matches (node_modules/esquery/esquery.js:158:25)
at matches (node_modules/esquery/esquery.js:76:30)
at Function.matches (node_modules/esquery/esquery.js:103:25)
at NodeEventGenerator.applySelector (node_modules/vue-eslint-parser/index.js:3272:21)
at NodeEventGenerator.applySelectors (node_modules/vue-eslint-parser/index.js:3284:22)
at NodeEventGenerator.enterNode (node_modules/vue-eslint-parser/index.js:3295:14)
at traverse (node_modules/vue-eslint-parser/index.js:113:13)
at traverseNodes (node_modules/vue-eslint-parser/index.js:131:5)
at scriptVisitor.Program:exit.node (node_modules/vue-eslint-parser/index.js:3731:25)
Note that the test passes if the rule is changed to
Tell us about your environment
Firstly, huge thanks for adding the no-restricted-syntax rule. It's proving very useful.
However, I'm having trouble with the following rule
This works fine on
no-restricted-syntax
, but fails onvue/no-restriceted-syntax
.To reproduce, add the following test case to the no-restricted-syntax test:
What did you expect to happen?
Test would pass
What actually happened?
Test failed:
Note that the test passes if the rule is changed to
Thanks again!
The text was updated successfully, but these errors were encountered: