-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error thrown on nth-child with ExperimentalSpreadSyntax #67
Comments
The version of |
@michaelficarra , what do you think of providing a method to have the user build an esquery instance with their own traverser and/or VisitorKeys baked in? (There was #105 , but maybe exposing a method would be clearer?) The current default export could be made to rely on it, but if you were in favor of the idea, it wouldn't need to be a breaking change unless:
In the case of this particular issue, however, if it is possible for @aduth to use |
I believe this can be closed now (if the user supplies their own custom keys). |
Fixed by #112. |
Minimal reproduceable example:
https://astexplorer.net/#/gist/e0fb7d08090a532c3cdce571593671b2/622c0d4fed220a6b8d6655f0f746916aeb8bfb60
The
:nth-child
selector throws an error if object spread syntax (type
ofExperimentalSpreadSyntax
) is encountered.Stack trace:
Throwing line:
esquery/esquery.js
Line 204 in 1853a6f
Real-world use-case:
I am trying to create a
no-restricted-syntax
ESLint rule for forbidding all butArrayExpression
as the second argument of Lodash methods which acceptpath
argument:This works in isolated usage:
https://astexplorer.net/#/gist/e0fb7d08090a532c3cdce571593671b2/b70d4572529d872e27f8c3df62c4ce0be43dba88
...but with above error, fails with the object spread syntax.
The text was updated successfully, but these errors were encountered: