Thanks very much for the reply. I’d really like to get this working if I can. Here are my follow-ups:
Download and install NodeJS for Windows, latest stable version. Reboot. After this, open CMD.exe and type
npm install -g jshint
Done. The output of this was
C:\Users\snarl\.npm-global\jshint -> C:\Users\snarl\.npm-global\node_modules\jshint\bin\jshint
+ jshint@2.9.5
updated 1 package in 1.815s
Can you shed light on what this output means, especially the first line? I see there is a jshint file in each of the directories listed on the first line. But do I need to ensure one or both of those directories is in my PATH
?
Then reboot again just for the sake of it. After this, try opening a .JS file in Sublime Text again and see if it’s working (it should).
I tried, but jshint does not appear to be working. The test I ran was to open a .JS file in SublimeText, then delete a line-ending semi-colon. No icon appeared in the gutter as I expected from jshint.
It looks like you’ll need to install Python as well, by the looks of that .PY file that can’t be located in your logs.
OK thanks for that.
One additional error message is:
SublimeLinter: WARNING: jshint deactivated, cannot locate 'jshint'
Do you think indicates a separate, possibly PATH
related issue?
edit: As a test, I opened CMD and typed ‘jshint --version.’ It returned ‘file not found,’ which leads me to believe it is a PATH issue. Then, to my PATH I added C:\Users\snarl.npm-global. I ran ‘jshint --version’ again, and it returned the same thing (‘file not found’). I then rebooted my computer and ran it again. This time it returned jshint v2.9.5. I then opened a JS file in SublimeText and the output in the console was more promising. It found jshint and printed several errors in the JS file in-question. Also, in the SublimeText gutter now appeared jshint icons, as expected. There are still the missing py errors though. The SublimeText console output is:
SublimeLinter: jshint version query: C:\Users\snarl\.npm-global\jshint.cmd --version
SublimeLinter: jshint version: 2.9.5
SublimeLinter: jshint: (>= 2.5.0) satisfied by 2.9.5
SublimeLinter: jshint activated: C:\Users\snarl\.npm-global\jshint.cmd
Traceback (most recent call last):
File "C:\Users\snarl\AppData\Roaming\Sublime Text 3\Packages\SublimeLinter\lint\util.py", line 247, in generate_color_scheme_async
scheme_text = sublime.load_resource(scheme)
File "C:\Program Files\Sublime Text 3\sublime.py", line 192, in load_resource
raise IOError("resource not found")
OSError: resource not found
SublimeLinter: jshint: main-development.js ['C:\\Users\\snarl\\.npm-global\\jshint.cmd', '--verbose', '--filename', '@', '-']
SublimeLinter: jshint output:
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 2, col 17, Missing semicolon. (W033)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 2685, col 43, This character may get silently deleted by one or more browsers. (W100)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 3592, col 6, Unnecessary semicolon. (W032)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 3901, col 6, Missing semicolon. (W033)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 4188, col 25, 'links' is already defined. (W004)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 4189, col 25, 'url' is already defined. (W004)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 4907, col 21, 'currentEl' is already defined. (W004)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 4908, col 21, 'top' is already defined. (W004)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 4909, col 21, 'end' is already defined. (W004)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 5203, col 41, Missing semicolon. (W033)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 6583, col 6, Missing semicolon. (W033)
C:\temp-c\codecanyon-8534570-cube-portfolio-responsive-wordpress-grid-plugin\cubeportfolio-wp-plugin\cubeportfolio\public\js\main-development.js: line 6767, col 13, 'forceWidthBlock' is already defined. (W004)
12 errors
Package Control: Skipping automatic upgrade, last run at 2017-11-20 11:59:17, next run at 2017-11-20 12:59:17 or after
I guess we can consider this resolved then? Perhaps I will look into the ‘py’ errors separately.