Open michaelBenin opened 9 years ago
As far as I am aware js-beautify supports a good deal of ES6, though it is challenging to say how much. The only way to gauge the degree of support is to examine a large variety of unit tests and determine the percentage passing and identify any defects.
It would be silly for any project to claim 100% support when even the browsers and babel don't offer 100% support.
@prettydiff - well said. :+1:
@michaelBenin - I do see your point. This project has come a long way (and also has a long way to go). Javascript is is used in many different environments and dialects (ES6, ES7, Dart, ReactJS). It would be helpful to have a high-level view of what is supported and what isn't. That said, nailing down the degree of support for various dialects is time consuming.
This best path at this point is to try it, see if any issues you encounter have already been filed, and if not, please file them.
If anyone would like to suggest how to measure es6 support, I'm open to it.
Perhaps if there were a directory in the unit tests specifically for ES6 cases. The more unit tests there the better, and not for identifying current ES6 support, but for identifying missing support. This would provide direction on what is missing and potential defects. It would require contributions from the community to increase the quantity and diversity of tests.
To get this started I use these files to test destructuring, which is a concept new to ES6. The files also contain a lot of code examples with minor ES6 conventions:
I process the code from the raw directory and compare to the sanitized code in the correct directory as a part of my unit tests.
I think it would be helpful if the readme contained support.