Ale: Deprecate `flow` linter

Created on 18 Jul 2019  路  2Comments  路  Source: dense-analysis/ale

Hi, I am from the Flow team and I am contemplating deprecating our non-LSP APIs. I wanted to discuss deprecating the flow ALE linter in favor of the flow-language-server linter.

I have to admit that I'm not a regular vim user, so my experience with ALE is very limited. But as far as I can tell, flow-language-server is a superset of flow since both handle diagnostics.

I think it'd be great if the two linters merged, so that flow used the LSP (perhaps only for newer Flow versions?) and flow-language-server got deprecated. flow is the better, more consistent name IMO.

If there are any issues with our LSP implementation that make people prefer the flow linter, I'd like to resolve those ASAP. The LSP is our primary API going forward.

enhancement

Most helpful comment

All 2 comments

I think I mentioned this somewhere on GitHub previously, but I can't remember where I said it. What should happen here is that ALE should check the flow version and switch between two linter definitions, one for the language server, and one for the old linter. Then ALE can automatically choose the language server when it's stable enough, and the older linter when the language server isn't available. The easiest way to accomplish this is to define two flow linters with different names with version checks where they disable themselves if the the other counterpart linter is enabled and version is too low or high.

" This could be in a `flow` linter.
if ale#semver#GTE(a:version, [1, 2, 3]) && l:flow_ls_enabled
    return ''
endif

" ...

" This could be in a `flow_ls` linter.
if !ale#semver#GTE(a:version, [1, 2, 3]) && l:old_flow_enabled
    return ''
endif

ale#linter#Get is the best way to get the list of enabled linters.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trevordmiller picture trevordmiller  路  3Comments

sublee picture sublee  路  3Comments

trevordmiller picture trevordmiller  路  4Comments

catbaron0 picture catbaron0  路  3Comments

aressler38 picture aressler38  路  3Comments