Skip to content

Instantly share code, notes, and snippets.

@davidfmiller
Last active December 12, 2017 19:56
Show Gist options
  • Save davidfmiller/436c5e60a9a98f6adc31ce1ee008f332 to your computer and use it in GitHub Desktop.
Save davidfmiller/436c5e60a9a98f6adc31ce1ee008f332 to your computer and use it in GitHub Desktop.
BBEdit ESLint
(* Pipe eslint output into a BBEdit results window *)
try
tell application "BBEdit"
set mydoc to file of (document 1 of window 1)
end tell
set posixPath to POSIX path of mydoc
set cmd to "/usr/local/bin/node /usr/local/bin/eslint -c ~/.eslintrc.js -f unix " & (quoted form of POSIX path of mydoc) & " | /usr/local/bin/bbresults"
do shell script cmd
on error
beep
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment