Closed SimenB closed 8 years ago
I think this might be out of scope for this tool, it's really just intended for converting import module syntax. Also as far as I know the 'use scrict'
declaration won't do any harm in ES6 code.
It doesn't do any harm, no, but it's "dead code", as ES6 modules are implicitly strict by default.
http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
Module code is always strict mode code.
we do sed -i /.use.strict.;/d $file
after amdtoes6
call
+1 I'll be using the branch that removes use-strict. Its within scope and its completely valid.
Convinced, please see #19 which includes this.
use strict
is default in ES6, so I'm thinking this does not have to be behind a flag. https://babeljs.io/docs/advanced/transformers/other/strict/No idea if this is the way to do it, and it's also kept if the source is returned early.
This is probably not ready for merge, as I just hacked something together that works for my project, not necessarily the best way to do it