Created
March 25, 2013 23:42
-
-
Save jsatk/5241937 to your computer and use it in GitHub Desktop.
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
# JS Lint | |
# Reference: http://blog.simplytestable.com/installing-jslint-for-command-line-use-on-ubuntu/ | |
function jslint { | |
filename=${1##*/} # Name of file. | |
dir="/Users/Jesse/Desktop/" # Directory where you want your lint files output. Must be full path. No ~. | |
path="$dir$filename-lint.js" | |
/usr/local/bin/node /usr/share/node-jslint/node_modules/jslint/bin/jslint.js "$1" > "$path" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow the instructions on how to install command line JS Line here. After you've installed add this function to your
.bash_profile
. Please note that you need to changedir
to be your own username.~
is not supported. Secondly make sure line 7 is properly pointed to your local installation of node. Mine lives in/usr/local/bin/
rather than/usr/bin/
.