Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
Source Link

How to display js2-mode warnings

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?