detecting JS language mode for tools

John Lenz concavelenz at gmail.com
Fri Jan 24 08:48:35 PST 2014


For static language parsers there seems to be a bit of a dilemma with ES6
modules.  I would appreciate a correct or hint.

Here is my understanding:

  - standard scripts as we know them today will parse in the browser as
"loose" code
  - scripts with the standard "use strict" will parse as "strict" with
access to all ES6 goodness
  - scripts loaded as modules will parse as "strict" even without the "use
strict" annotation.

Is this true?  If so, it seems like a tooling hazard and "use strict" on
modules should at least be the encouraged convention.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140124/9cba8e16/attachment.html>


More information about the es-discuss mailing list