-
-
Save avendael/46b9a80100b59ea9ea93 to your computer and use it in GitHub Desktop.
Flycheck with JSCS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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