Open hayeswise opened 7 years ago
@@PLUGINSTART-USE-STRICT@@ makes sense, why not create a pull request for it?
Instead of separate macro @@PLUGINSTART-USE-STRICT@@
it's more proper (and simple) just modify wrapper for all plugins.
Is there any reason not to use strict;
nowadays?
I'm developing code using the IITC development framework and I've come to realize that using
"use srict";
is problematic in this setting:"use strict";
must occur before any other statements and @@PLUGINSTART@@ is replace with a few lines of code after thefunction wrapper(plugin_info) {
.I've noticed that you can put
"use strict";
before@@PLUGINSTART@@
and any other code in the file; but, TamperMonkey's jslint will flag this as warning: Use the function form of "use strict".So one alternative is to put the following before any other code:
But, if you have
"use srict";
elsewhere, then jslint flags a bunch of errors. Furthermore, if you're mixing in non-strict code then more errors could be flagged (I'm using @@INCLUDERAW:...@@).Thus, it seems like it would be better to do something like
or