Skip to content

Instantly share code, notes, and snippets.

@nucleardreamer
Created February 1, 2014 01:51
Show Gist options
  • Save nucleardreamer/8746806 to your computer and use it in GitHub Desktop.
Save nucleardreamer/8746806 to your computer and use it in GitHub Desktop.
• Install Xcode (https://developer.apple.com/xcode/)
• Install Command line tools from Xcode
Xcode => Preferences => Downloads => Components => Command Line Tools
• Install node.js
Download and install Node.js v 0.10.12 (http://nodejs.org/dist/v0.10.12/node-v0.10.12.pkg)
• Install jshint and create soft link
npm install -g jshint
cd /usr/bin
sudo ln -s /usr/local/bin/jshint
• Install gjslint and create soft link
sudo easy_install http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz
cd /usr/bin
sudo ln -s /usr/local/bin/gjslint
• Install Sublime Text Editor
http://www.sublimetext.com/
• Install Package Control for Sublime Text Editor 2
https://sublime.wbond.net/installation#st2
• Restart Sublime Text
On Macs, simply closing the window does not exit the app, you must do an explicit quit.
Sublime Text Editor => Quit Sublime Text 2
• Install Sublimt JSHint Gutter plugin
In Sublime Text: Command-Shift P, Package Control: Install Package
JSHint Gutter
You can optionally configure Sublime to lint on edit or save: https://github.com/victorporof/Sublime-JSHint#automatically-linting-on-edit-or-save
• Install SublimeLinter
In Sublime Text: Command-Shift P, Package Control: Install Package
SublimeLinter
Configure SublimeLinter to use Google Closure Linter
Go to Sublime Text 2 => Preferences => Package Settings => SublimeLinter => Settings - Default
Copy the entire file that has been opened here
Go to Sublime Text 2 => Preferences => Package Settings => SublimeLinter => Settings - User
Paste contents into this file
Make the following edits:
"sublimelinter_gutter_marks": true,
"sublimelinter_mark_style": "none",
"javascript_linter": "gjslint",
"gjslint_options": [],
"gjslint_ignore":
[
110, // line too long
220 // jsdoc supression
]
• Quit Sublime Text 2 and restart it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment