This is a TextMate 2 JSHint plugin using the npm package version of JSHint.
Note: since JSHint stopped caring about style issues, I've decided to create a more generic javascript hinter bundle, that uses both JSHint and JSCS. The project is called JavascriptHinter.tmbundle, it uses the system installed version of jshint and jscs, and displays hint warnings in the gutter, supported by TextMate in the latest beta versions. I've tried to keep the functionality of this project to make switching as painless as possible, but let me know if you run into troubles using the new one!
Originally forked from the JSHint.tmbundle by oost to make a few bugfixes, but ended up creating a full rewrite instead.
Requirements:
Installation:
- Clone the repository
git clone git://github.com/bodnaristvan/JSHint.tmbundle.git
. - Go to the directory
cd JSHint.tmbundle
. - Run
make
- Run
open .
in the same directory to install the bundle - If you run into problems with node not found while running the plugin, check out this comment: #1 (comment)
Bundle will use the .jshintrc location set in ${TM_JSHINT_CONFIG}
, or look for it in the following places:
- directory of currently opened file and all parent directories until one is found
${HOME}/.jshintrc
- default jshintrc provided with the bundle
By default, Textmate2 shows any bundle output in a popup window, but also supports a sidebar as shown in the screenshot above.
To switch to using sidebar..
defaults write com.macromates.TextMate.preview htmlOutputPlacement right
Or switch back to window
defaults write com.macromates.TextMate.preview htmlOutputPlacement window