tbinetruy / config

13 stars 4 forks source link

activate only on // @flow files? #1

Open jaketrent opened 6 years ago

jaketrent commented 6 years ago

Is there a way to activate the type checking of a file only if there is a //@flow comment in the buffer? I have projects that are not flow-typed or partially flow-typed, and I'm still getting red lines with flow type errors in spacemacs.

But outside of the editor (in the partially flow-typed project), flow cli reports "No errors!".

jaketrent commented 6 years ago

Any thoughts? I'd love to hear your expert opinion on this.

Jason94 commented 5 years ago

The flycheck-flow plugin does this very well (https://github.com/lbolla/emacs-flycheck-flow). Probably the easiest way to solve this issue would be to pull some code from them, or use that package outright.

I use it in my regular emacs configuration, and it works quite well.