{"id":240,"date":"2014-02-26T17:21:26","date_gmt":"2014-02-26T17:21:26","guid":{"rendered":"http:\/\/nikola-breznjak.com\/blog\/?p=240"},"modified":"2015-08-20T11:47:17","modified_gmt":"2015-08-20T11:47:17","slug":"using-jshint-in-sublime-text-on-windows-machine","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/miscellaneou\/sublime-text\/using-jshint-in-sublime-text-on-windows-machine\/","title":{"rendered":"How to use JSHint in Sublime Text on Windows machine"},"content":{"rendered":"<p>Since this is in the &#8220;<a href=\"http:\/\/nikola-breznjak.com\/blog\/category\/quick-tips\/\">quick tips<\/a>&#8221; category I won&#8217;t go into what <a href=\"http:\/\/www.sublimetext.com\/3\">Sublime Text<\/a> is, or why using <a href=\"http:\/\/www.jshint.com\/\">JSHint <\/a>is recommended, and that for it&#8217;s installation you need <a href=\"http:\/\/nodejs.org\/\">Node.js<\/a>, I will just state the shortest possible path in how to install it, as I had some problems in doing this in a timely fashion:<\/p>\n<pre class=\"lang:default decode:true\">\/\/install jshint via npm\r\nnpm install jshint -g<\/pre>\n<p>In Sublime Text install\u00a0<a href=\"https:\/\/github.com\/victorporof\/Sublime-JSHint\">JSHint Gutter<\/a>\u00a0via package manager.<\/p>\n<p>And now, finally, since I&#8217;m on a windows machine, the problem was that once I got all this installed I had to set the Node.js path in JSHint Gutter plugin but with setting the\u00a0absolute path to node.exe by using <strong>forward slashes<\/strong>:<\/p>\n<pre class=\"lang:default decode:true\">{\r\n  \/\/ Simply using `node` without specifying a path sometimes doesn't work :(\r\n  \/\/ https:\/\/github.com\/victorporof\/Sublime-JSHint#oh-noez-command-not-found\r\n  \/\/ http:\/\/nodejs.org\/#download\r\n  \"node_path\": \"C:\/Program Files\/nodejs\/\",\r\n\r\n  \/\/ Automatically lint on edit (Sublime Text 3 only).\r\n  \"lint_on_edit\": false,\r\n\r\n  \/\/ Automatically lint when a file is saved.\r\n  \"lint_on_save\": true,\r\n\r\n  \/\/ Highlight problematic regions when selected.\r\n  \"highlight_selected_regions\": false\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Since this is in the &#8220;quick tips&#8221; category I won&#8217;t go into what Sublime Text is, or why using JSHint is recommended, and that for it&#8217;s installation you&hellip;<\/p>\n","protected":false},"author":1,"featured_media":245,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,13,14],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quick-tips","category-sublime-text","category-windows"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":5,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"predecessor-version":[{"id":2132,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions\/2132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/245"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}