Package Control : Install Packages > Sublime JSHINT CTRL/CMD + SHIFT + P > Package Control : Install Packages > SublimeLinter CTRL/CMD + SHIFT + P > Package Control : Install Packages > Sublime On Save Build CTRL/CMD + SHIFT + P > Package Control: Install Packages > Detect Syntax" /> Package Control : Install Packages > Sublime JSHINT CTRL/CMD + SHIFT + P > Package Control : Install Packages > SublimeLinter CTRL/CMD + SHIFT + P > Package Control : Install Packages > Sublime On Save Build CTRL/CMD + SHIFT + P > Package Control: Install Packages > Detect Syntax" /> Mac OSX: How to install JSHint to the commandline / Sublime Text with Node | Dev Tricks

Mac OSX: How to install JSHint to the commandline / Sublime Text with Node

Posted on in Environment Sublime Text

Install Node:
http://nodejs.org/download/
Download the Mac OS X package, and install it. Test by opening up a Terminal and typing "node -v". It should say something like "v0.8.11" or higher.

Install NPM (package manager)
https://npmjs.org/

curl http://npmjs.org/install.sh | sh

Install JSHint via NPM

sudo npm -g install jshint

To have JSHint installed in Sublime, use the package control and install the following packages:

http://wbond.net/sublime_packages/package_control/installation

CTRL/CMD + SHIFT + P > Package Control : Install Packages > Sublime JSHINT
https://github.com/uipoet/sublime-jshint
CTRL/CMD + SHIFT + P > Package Control : Install Packages > SublimeLinter
https://github.com/SublimeLinter/SublimeLinter
CTRL/CMD + SHIFT + P > Package Control : Install Packages > Sublime On Save Build
https://github.com/alexnj/SublimeOnSaveBuild
CTRL/CMD + SHIFT + P > Package Control: Install Packages > Detect Syntax
https://github.com/phillipkoebbe/DetectSyntax

Comments

  1. TR Baxter says on
    June 8, 2013 at 5:23 pm
    Reply

    Is there any way to install JSHint without having direct internet access on the target machine?

    ie. not being able to run “curl” or “npm” commands?

  2. Talentlines says on
    March 10, 2014 at 2:53 pm
    Reply

    Good article. Recently I took many hours on debug javascript code for my recruitment management system. Your article helped me a lot.

  3. Perry Mitchell says on
    April 2, 2014 at 9:29 am
    Reply

    You have a typo I believe – You’re installing *jslint* through npm, not jshint (as your article states).

    • Lee says on
      April 5, 2014 at 11:35 am
      Reply

      Thanks Perry. I updated the post!

Post a Comment

Your email is never published nor shared.
Required fields are marked *