Skip to content

Instantly share code, notes, and snippets.

@piecyk
Forked from hvesalai/gist:407a3a6543e01b2909e2
Last active August 29, 2015 14:19
Show Gist options
  • Save piecyk/bb102357d4826822359d to your computer and use it in GitHub Desktop.
Save piecyk/bb102357d4826822359d to your computer and use it in GitHub Desktop.
(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