pichillilorenzo / JavaScriptEnhancements

JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
MIT License
638 stars 41 forks source link

Interoperability with sublimelinter #47

Closed nejsimon closed 6 years ago

nejsimon commented 6 years ago

It would be nice if Javascript Enhancements could be used together with SublimeLinter!

When a linter detects an error it will properly mark the code block in red but when hovering it you get something nonsensical from JavascriptEnhancements and not the expected tooltip message from SublimeLinter detailing the error. You can still see the error in the status field when placing the cursor in the code block though.

Expected Behavior

The linter error is shown when hovering the code.

Actual Behavior

A nonsensical message i shown

Sublime Text console logs

No errors in the log

Screenshots

SublimeLinter, JavaScriptEnhancements enabled enabled SublimeLinter enabled, JavaScriptEnhancements disabled disabled

Steps to Reproduce the Problem

  1. Install SublimeLinter and a linter plugin for js files
  2. Install JavascriptEnhancements
  3. Write some broken code
  4. Hover the broken code when the linter detects the error

Specifications

pichillilorenzo commented 6 years ago

It's weird because this souldn't happen.. In this case you should see a red popup from the flow linter saying that it's an error.. Maybe there are some problems with async functions

pichillilorenzo commented 6 years ago

Ah no sorry, you aren't in a JavaScript project, so you need to active the flow linter using the Tools menu! See here https://github.com/pichillilorenzo/JavaScriptEnhancements/wiki/Errors-and-linting

monovertex commented 6 years ago

I'm encountering a similar issue, as I'm using SublimeLinter as well, with ESlint. I don't need or plan to use flow lint. In my case, JSE overrides the tooltip displayed by SublimeLinter.

With JSE enabled: image image

With JSE disabled: image

It would be nice if we could set a level of priority, so that the SublimeLinter tooltip would have higher priority if needed, as I figure displaying both of them would be too complicated.

nejsimon commented 6 years ago

That's my situation as well. We have a bunch of eslint rules including a few custom ones to enforce our code conventions so I can't switch to flow even though there might be advantages.

pichillilorenzo commented 6 years ago

I will check about that :+1:

pichillilorenzo commented 6 years ago

Try the new version 0.16.14! Now it should work.

nejsimon commented 6 years ago

It seems to be working! Thanks a lot!

ahmadsholehin commented 5 years ago

I seem to have this issue. Using 0.16.20, Sublime 3.2.

JSE is blocking SublimeLinter's tooltips when hovering regions.