-
Notifications
You must be signed in to change notification settings - Fork 513
Supporting ES7/Babel #1353
Comments
Created - https://github.com/jscs-dev/babel-jscs |
Almost ready to do an initial version - can someone give thoughts on the change in #1369? Just ran all the |
@moroshko, @olanod, @ben-ng - If you want to try it out, I created https://github.com/hzoo/babel-jscs for testing (no npm package yet). Will wait for the next release and then move to https://github.com/jscs-dev/babel-jscs - (or should I just do that now?). You'll need to update {
"node-jscs": "jscs-dev/node-jscs#master",
"babel-jscs": "hzoo/babel-jscs#master"
} |
Does it work with our tests? We can intergrate this in our CI-runs, if it pass, i think we could do the npm package and push to jscs-dev org repo |
I still have to figure out how to run the tests (git submodule?) not sure yet. I ran it manually before and got a few issues regarding cli, and quotes (babel infers the quotes will always output the same one). |
It seems babel-jscs has support for jsx? |
Yeah it will parse anything babel supports itself since it will be an option for esprima - |
So is there anything preventing us from dropping |
For me it would be that it hasn't been tested as much yet and not all the tests pass (at the moment) but that shouldn't be too hard to fix. |
Well, we described this Otherwise jsx and more extensive es6 supports does it for me. @mikesherov, @zxqfox, @mrjoelkemp, @mdevils thoughts? |
@markelog 👍 for jsx as a plugin for esprima ast. And I'm not sure we need this when we'll support esprima 2.x. Since there I'm not against using it for another library. But it's a revolution, and need to hear @mikesherov about it. |
@hzoo thank you!! 🙏 I was trying to set up jscs on a project that uses babel (es6) + flow, and couldn't find any parser that could accommodate both. your package made everything magically work. hope you keep developing it 👍 |
Just added this feature to 2.0 roadmap, i hope you don't mind |
As for me, there is a strange situation around
|
I hope someone can share his picture on |
Nice list
Not fully, plugin interface will come right after full support of the ES6.
ES6 is back-compat, so i don't see an issue there. Acorn supports es6 and written on es6-dialect also has plugin for jsx, you forgot the espree btw :-). Answer for In any case, i put all my money on |
Hey @hzoo, do you have time to provide pr for this? |
What would I need to do for the pr? |
Basically, pr that proposes to use |
@hzoo where should I file issues? here: |
@deezahyn Um yeah just file it at https://github.com/hzoo/babel-jscs there until I move it to https://github.com/jscs-dev/babel-jscs. I guess we can just do it whenever. However for that particular issue about quote marks I documented in the readme already. Not sure what we can do about it @sebmck?
|
This is completely unrelated to the parser and is done in the code generator (which |
@sebmck Ah ok. I didn't do enough research then xd. @deezahyn Yeah you can make an issue for it in the repo or I'l do it later (added in hzoo/babel-jscs/issues/1) @markelog Ok shouldn't be too hard to just replace the parser for esnext. Seems like it's just this._esprima = options.esprima || (options.esnext ? babelJscs : defaultEsprima); |
Yeah :-) |
Why not publish an beta version( Install from github, sometimes will be too slow. |
Sounds like a good idea (would be good so people can test and find any big issues). I think we're going to release "soon" though 😄 |
@hzoo That great. Waiting for you beta release. |
I'm trying to enable es7 decorator rules in jscs. Will this help me out? |
Now you just need to use |
For #1352, #1344, #1270.
My plan is to make
babel
a possible parser to use in theesprima
option.I could do a repo for this so you can do
"esprima": "babel-jscs"
or something like that.Nothing would need to be changed in
jscs
itself.babel-jscs
would modify the acorn parser to output into an esprima format and patchestraverse
(just modifyingbabel-eslint
somewhat).I got it working on an es7 code snippet (the issues linked) and a small project but running it with more rules leads to some errors that still need to be fixed.
The text was updated successfully, but these errors were encountered: