Javascript lint error suppression

I am developing a Firefox extension and I would like to use Javascript Lint to help me find bugs. However, I continue to receive the message "SyntaxError: missing name after. Operator" for the second line:

const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

Apparently, this is because "import" is a keyword. But it was also used in Mozilla ... A similar problem is with the keyword "let".

Does anyone know how to ignore these errors?

+3
source share
1 answer

, , Yahoo Group, .

, JSLint, http://www.jslint.com/, :

reserve('import');
+2

Source: https://habr.com/ru/post/1759085/


All Articles