It's a good general practice to add "use strict"; to the top of each major function. It would be nice to have a strict option on the filter that would add it just inside the function() { } wrapper.
Why not just have the user put it in each source file? Because global "use strict"; is a bad idea, so things like JSHint expect it to be inside a function() {}() call. To do this in the source files means that each source file would have to look like
It's a good general practice to add
"use strict";
to the top of each major function. It would be nice to have astrict
option on the filter that would add it just inside thefunction() { }
wrapper.Why not just have the user put it in each source file? Because global
"use strict";
is a bad idea, so things like JSHint expect it to be inside afunction() {}()
call. To do this in the source files means that each source file would have to look likewhich would then get compiled to
There's nothing wrong with that, but it seems wasteful.