1

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?

1 Answer 1

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.

3
  • 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. Commented Aug 21, 2019 at 21:55
  • I looked at the current version posted on github.
    – nega
    Commented Aug 22, 2019 at 13:07
  • Thanks. Got it working. Commented Aug 23, 2019 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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