When using ES6 syntax in an application LiveView will currently error out (however you wont see LiveView error out because of TIMOB-24694).
It's possible we could just update the acorn to a newer version allowing ES6 (and newer) code, but
- We don't own the package https://www.npmjs.com/package/jsparse-tools
- The repo doesnt exist (or is private)
We could grab the source from an npm install and update where necessary, I believe MIT allows this.
I had a quick try of updating to the latest acorn version and these were my observations
- The return data from the detect function stays the same across versions, so the acorn upgrade should not problematic
- Using const will throw an error, this seems to be because LiveView makes some assumptions about the length of a variable declaration, let works (let and var are both 3 characters long). (https://github.com/appcelerator/liveview/blob/de6bb766edf10b83e28e5f941528d420ef50798d/lib/fserver.js#L314-L324)
- There is a note about usage of const in the docs but I cannot track down the origins of this warning https://wiki.appcelerator.org/display/guides2/LiveView#LiveView-Troubleshooting
- This is only run for app.js files I believe