-
-
Save blue0513/f503c26bf5cb8a1b6fb6e75f1ec91557 to your computer and use it in GitHub Desktop.
run eslint --fix on emacs file save
This file contains 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
;; forked from https://gist.github.com/ustun/73321bfcb01a8657e5b8 | |
(defun eslint-fix-file () | |
(interactive) | |
(call-process-shell-command | |
(concat "eslint --fix " (buffer-file-name)) nil 0)) | |
(defun eslint-fix-file-and-revert () | |
(interactive) | |
(eslint-fix-file) | |
(revert-buffer t t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment