Last active
August 29, 2015 14:19
-
-
Save hvesalai/407a3a6543e01b2909e2 to your computer and use it in GitHub Desktop.
gulp error handler
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
(add-hook 'js-mode-hook '(lambda () | |
;; /home/hvesalai/projects/foo/Bar.jsx: line 6, col 63 | |
(add-to-list 'compilation-error-regexp-alist-alist | |
`(eslint-compact | |
,(rx line-start | |
(group (zero-or-one letter ":") (1+ (not (any ": ")))) | |
": line " (group (1+ digit)) | |
", col " (group (1+ digit))) | |
1 2 3)) | |
;; ReactifyError: /home/hvesalai/projects/foo/Bar.jsx: Parse Error: Line 89: | |
(add-to-list 'compilation-error-regexp-alist-alist | |
`(reactify-error | |
,(rx line-start (zero-or-more (any "0-9: ][")) "ReactifyError: " | |
(group (zero-or-one letter ":") (1+ (not (any ": ")))) | |
": Parse Error: Line " (group (1+ digit))) | |
1 2)) | |
(setq compilation-error-regexp-alist '(reactify-error eslint-compact)) | |
(add-hook 'before-save-hook 'whitespace-cleanup) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment