Skip to content

Instantly share code, notes, and snippets.

@jdelStrother
Created September 26, 2016 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdelStrother/2e2bc30285778fbcf4d45d433893ffea to your computer and use it in GitHub Desktop.
Save jdelStrother/2e2bc30285778fbcf4d45d433893ffea to your computer and use it in GitHub Desktop.
;;; packages.el --- flow-type layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Jonathan del Strother <jon@jons-mbp-4.local>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(defconst flow-type-packages
'(flycheck
flycheck-flow))
(defun flow-type/init-flycheck-flow()
(message "init flow flycheck")
(with-eval-after-load 'flycheck
(use-package flycheck-flow
:config
(progn ;
(message "yay flow flycheck")
;; Don't run flow if there's no @flow pragma
(custom-set-variables '(flycheck-javascript-flow-args (quote ("--respect-pragma"))))
;; Run flow in react-mode files
(flycheck-add-mode 'javascript-flow 'react-mode)
;; Run flow after eslint
(flycheck-add-next-checker 'javascript-eslint 'javascript-flow)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment