Desired Behaviour
Linting of .js files with Sublime Text 3.
Actual Behaviour
No linting is taking place.
For example the following shows no errors:
var x = ""
Steps To Reproduce
Environment
- Linux Mint 17 Cinnamon
- Sublime Text Build 3065
Tools > SublimeLinter > Lint Mode > "Background"
Tools > SublimeLinter > Mark Style > "Fill"
In Sublime Text (to install SublimeLinter and JSHint plugin)
- ctrl+shift+p
- Package Control: Install Package
- Install SublimeLinter
- Install SublimeLinter jshint plugin
At Command Line
Install node.js, npm and jshint with:
sudo apt-get install nodejs npm
sudo npm install -g jshint
Quit and restart Sublime Text.
Troubleshooting
At Command Line:
hash -r
which jshint
returns
/usr/local/bin/jshint
I also tried this solution (https://mcmap.net/q/1056710/-sublime-text-3-sublimelinter-plugin-not-able-to-find-jshint) involving manuualy changing the path in Preferences > Package Settings > SublimeLinter > "Settings - User"
and restarted Sublime Text but there was no change:
"paths": {
"linux": ["/usr/local/bin/jshint"],
"osx": [],
"windows": []
},
Documentation Reference
On how to install jshint plugin:
https://github.com/SublimeLinter/SublimeLinter-jshint
UPDATE
I just ran this in command line - the results may help to troubleshoot:
jshint --version
/usr/bin/env: node: No such file or directory
This also comes up in Sublime Text Console:
SublimeLinter: WARNING: no jshint version could be extracted from:
/usr/bin/env: node: No such file or directory