I'm developing a Firefox extension and I'd like to use Javascript Lint to help me find bugs. However, I keep on getting a "SyntaxError: missing name after . operator" error for the second line:
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Apparently it's because "import" is a keyword. But it's used like that in Mozilla... A similar problem is with the "let" keyword.
Anyone knows how to ignore those errors?
I don't think it is possible to disable this particular warning, but if you send a message to the Yahoo Group, outlining your requirements, you may be able to persuade Douglas Crockford to include this as an option in a future release.
Alternatively, if you have downloaded a version of JSLint, rather than using http://www.jslint.com/, you could try removing the line:
reserve('import');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With