Review and Resolve Problems

When you run Lightning CLI on your Lightning components code, the tool outputs results for each issue found in the files scanned. Review the results and resolve problems in your code.

For example, here is some example output.

error     secure-document    Invalid SecureDocument API
  Line:109:29
  scrapping = document.innerHTML;
  ^
  
  warning   no-plusplus   Unary operator '++' used
  Line:120:50
  for (var i = (index+1); i < sibs.length; i++) {
  ^
  
  error    secure-window  Invalid SecureWindow API
  Line:33:21
  var req = new XMLHttpRequest();
  ^
  
  error  default-case  Expected a default case
  Line:108:13
  switch (e.keyCode) {
  ^

Issues are displayed, one for each warning or error. Each issue includes the line number, severity, and a brief description of the issue. It also includes the rule name, which you can use to look up a more detailed description of the issue. See “Salesforce Lightning CLI Rules” for the rules applied by Lightning CLI, as well as possible resolutions and options for further reading.

Your mission is to review each issue, examine the code in question, and to revise it to eliminate all of the genuine problems.

While no automated tool is perfect, we expect that most errors and warnings generated by Lightning CLI will point to genuine issues in your code, which you should plan to fix before using the code with LockerService enabled.