I am trying to customize emacs/spacemacs to run a command after a key stroke, like running eslint --fix
command on the buffer to fix errors.
I already tried
(defun fix-errors-with-eslint ()
(shell-command-to-string (format "eslint --fix %s" buffer-file-name)))
(global-set-key (kbd "s-f") 'fix-errors-with-eslint)
but i receive an error: Wrong type argument: commandp, fix-errors-with-eslint
I am an emacs beginner, using only basic spacemacs and its layers, any help appreciated.
interactive
.