Hacker Newsnew | past | comments | ask | show | jobs | submit | eltaco's commentslogin

James is also on the Lerna team as well! He and I can answer questions about that too. (We also have a slack https://slack.lernajs.io/)


You can use loose mode which doesn't use try/catch blocks

http://babeljs.io/repl/#?experimental=false&evaluate=true&lo...


You can use loose mode or the loose option in that case.


ESLint is pretty awesome - the project has a great team and always adding new functionality (cache and then parallel linting sound great)!

Although it isn't unique for all the features listed, as JSCS has the same things: an autoconfigure feature, built-in (as well as user created) presets/configs, multiple formatters, custom plugins/rules, custom parsers (esprima/espree/babel), autofixing of almost all rules. Hopefully both projects can benefit or integrate better together more in the future? (I contribute to both!)

I think autofixing for all rules (maybe with https://github.com/cst/cst) would be a nice goal for the future when thinking about the next-generation of linters. Making it easier to update configs when new rules/options are added would be nice as well.


There's an issue for a CST (AST with whitespace, comments, etc) in the estree repo [1]. JSCS is planning on using https://github.com/mdevils/cst for future autofixing rules.

[1] https://github.com/estree/estree/issues/41


The beauty of this pretty-printing solution (merging it with the parser) is that you don't even need any parsing tree to be constructed. The parser will simply walk the stream and annotate it with the pretty-printing instructions (pushing an popping the indentation context, adding the weighted break candidates, etc.).


For javascript, there's been jsbeautifier [1], jsfmt [2], uglify.

JSCS [3] added autofixing a while back for most whitespace rules, and ESLint has just begun autofixing as well [4]

[1] http://jsbeautifier.org/ [2] https://github.com/rdio/jsfmt [3] http://jscs.info/ [4] https://github.com/eslint/eslint/pull/3635


Babel is working on minification[1] /dead code elimination [2] as well now

[1]: https://github.com/babel/babel/issues/1828 [2]: https://github.com/babel-plugins/babel-plugin-dead-code-elim...


You can use the airbnb preset with JSCS (javascript code style checker) [1].

Also there's an autofix feature for most of the whitespace rules (`jscs src --preset=airbnb --fix`) so you won't have to fix everything manually.

[1]: http://jscs.info/overview.html


There's currently a issue for "speed": https://github.com/babel/babel/issues/1486. Looks like it complied ember core from 50s to 18s now.


Yep, saw that. I don't think it's enough of an issue to not use Babel (my team uses it and we all think it's great), but it is suboptimal.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: