Skip to content

Instantly share code, notes, and snippets.

@avendael
Forked from ef4/.emacs
Last active March 29, 2020 19:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avendael/46b9a80100b59ea9ea93 to your computer and use it in GitHub Desktop.
Save avendael/46b9a80100b59ea9ea93 to your computer and use it in GitHub Desktop.
Flycheck with JSCS
;; Flycheck JSCS
(flycheck-def-config-file-var flycheck-jscs javascript-jscs ".jscs.json"
:safe #'stringp)
(flycheck-define-checker javascript-jscs
"A JavaScript code style checker.
See URL `https://github.com/mdevils/node-jscs'."
:command ("jscs" "--reporter" "checkstyle"
(config-file "--config" flycheck-jscs)
source)
:error-parser flycheck-parse-checkstyle
:modes (js-mode js2-mode js3-mode)
:next-checkers (javascript-jshint))
(defun jscs-enable () (interactive)
(add-to-list 'flycheck-checkers 'javascript-jscs))
(defun jscs-disable () (interactive)
(setq flycheck-checkers (remove 'javascript-jscs flycheck-checkers)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment