{"id":180,"date":"2015-04-09T18:30:27","date_gmt":"2015-04-10T00:30:27","guid":{"rendered":"http:\/\/www.managerjs.com\/blog\/?p=180"},"modified":"2015-04-09T16:04:57","modified_gmt":"2015-04-09T22:04:57","slug":"jscs-lints-and-shines-your-javascript","status":"publish","type":"post","link":"https:\/\/www.managerjs.com\/blog\/2015\/04\/jscs-lints-and-shines-your-javascript\/","title":{"rendered":"JSCS lints and shines your JavaScript"},"content":{"rendered":"<p>If you use Sublime Text you may want to try the <a href=\"https:\/\/github.com\/SublimeLinter\/SublimeLinter-jscs\">JSCS plugin for SublimeLinter<\/a>. JSCS stands for JavaScript Code Style. What makes it even more useful than JSHint? With this plugin it will even fix small style errors for you!<\/p>\n<p>Once you have the plugin working you&#8217;ll definitely want to \u00a0tailor the <a href=\"http:\/\/jscs.info\/rules.html\">rules<\/a>\u00a0<tt>.jscsrc<\/tt> file.<\/p>\n<p>One good gotcha: It ships with a lot of presets and has a lot of mirroring rule options. It might be tricky\u00a0for you to override the preset.<\/p>\n<p>For example, I opted for the Google preset and\u00a0wanted to add the\u00a0<tt>requireSpacesInAnonymousFunctionExpression<\/tt> rule. It wasn&#8217;t working until I realized the Google preset came with a mirroring option set:\u00a0<tt>disallowSpacesInAnonymousFunctionExpression<\/tt>. I had to set that to <tt>null<\/tt> explicitly before my own settings would work.<\/p>\n<p>Thank you to Addy Osmani for your <a href=\"https:\/\/medium.com\/@addyosmani\/auto-formatting-javascript-code-style-fe0f98a923b8?__s=pztt26hcsrhfeuwsspxy\">post on the sublime plugin<\/a>, and thank you to Josh at SublimeTextTips.com for mentioning it in your <a href=\"http:\/\/sublimetexttips.com\">newsletter<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use Sublime Text you may want to try the JSCS plugin for SublimeLinter. JSCS stands for JavaScript Code Style. What makes it even more useful than JSHint? With this plugin it will even fix small style errors for you! Once you have the plugin working you&#8217;ll definitely want to \u00a0tailor the rules\u00a0.jscsrc file.&hellip; <a class=\"more-link\" href=\"https:\/\/www.managerjs.com\/blog\/2015\/04\/jscs-lints-and-shines-your-javascript\/\">Continue reading <span class=\"screen-reader-text\">JSCS lints and shines your JavaScript<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"link","meta":{"footnotes":""},"categories":[13],"tags":[47,46,30],"class_list":["post-180","post","type-post","status-publish","format-link","hentry","category-lab-notebook","tag-code-styler","tag-javascript","tag-tools","post_format-post-format-link","wow fadeInUp","entry"],"_links":{"self":[{"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":1,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":181,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions\/181"}],"wp:attachment":[{"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.managerjs.com\/blog\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}