0

I am running Emacs 26.1 on Ubuntu 16.4. I am writing Javascript using js2-mode. When the linter underlines a line of code, I want to know what error or warning it has detected. For example, in this code:

function() { 
   return;
   return true;
}

js2-mode will underline the line

return true;

Because it cannot be reached after the first return statement, thus generating a warning. However, I cannot find anywhere where js2-mode actually shows me any text that explains why it has underlined that line. I gather that this should be possible, but the mode line and the mini buffer are both clear. Do I need to enable something or customize a variable?

0

Note, I don't use js2-mode, but doing M-x js2-display-error-list RET will open a buffer with all the errors in it. Do C-h f js2-display-error-list RET to get more info.

  • Do you know if this is for a particular version of js2-mode? I don't seem to have that function. The closest autocomplete is js2-mode-display-warnings-and-errors. – Apocalypse Mystic Aug 21 at 21:55
  • I looked at the current version posted on github. – nega Aug 22 at 13:07
  • Thanks. Got it working. – Apocalypse Mystic Aug 23 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.