-
Notifications
You must be signed in to change notification settings - Fork 9
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
add a js parser #368
Comments
SWC has typescript support https://swc.rs/docs/getting-started |
Seems to be a good choice. It should be more perfomant - what is not an issue for now, but adds an extra layer to learn for contributors. What is your opinion @David-Pena ? Maybe we try to use it for a problematic rule and let's see if we can add some support for new contriubors? |
Esprima doesn't support typescript syntax as far as I know. Babel does and it can generate an ESTree-compliant AST that can be used with various libraries like ast-types and esquery not like SWC which has its own non-ESTree AST and isn't compatible with the myriad of libraries for working with ESTree ASTs Another option is to use ast-grep API which has its own vue language support Originally posted by @UnrefinedBrain in #358 (comment) |
Time to study again... IMO the best approach would be to transition slowly and starting with the problematic rules like |
At the end, which parser are we going to use? Did you find the benchmark you were looking for? @rrd108 |
as performance is not an issue at all (yet) I doped my benchmark effort. We need some more digging which parser to use. |
All of the parsers are very fast. I don't think that's something we'll see a noticeable difference on between them I recommend using Using a html parser instead of vue-eslint-parser could work too, but it won't parse directive bodies as JS expressions Do you want a PR? i can help you |
@UnrefinedBrain yes we would really appreciate a PR. Both of us working on other issues, so you are very welcome to contribute. |
That would be awesome! I'll learn from those PRs 🫡 |
Update @rrd108 : I just finished the refactor of the |
Originally posted by @rrd108 in #358 (comment)
The text was updated successfully, but these errors were encountered: