0

Last week I found this awesome text editor "Sublime Text 3" and I love the plugins.

Everything is working except the SublimeLinter plugin and the plugins that add language specific linting to it.

I have a problem with PHP and JavaScript working together with the following:

php does work but I dont know how to get JavaScript to work. For php what I did is go to Pref>pac set>Sublime Linter>Settings-User Then I set the following:

 "paths": { "linux": [], "osx": [], "windows": [ "C:/Users/**/Documents/php-5.5.11-nts-Win32-VC11-x86/" ] },

(in the ** is my pc name)

That is working perfectly. But I know I have to install node.js that is what I have done.

I made a build system:

{   "cmd": ["C:/Program Files/nodejs", "$file"],   "selector": "source.js"   }

It is not working, and did this one too:

{   "cmd": ["node", "$file"],   }

I have installed: sublimelinter, sublimelinter-php, sublimelinter-jsl, and sublimelinter-jshint.

It would be very nice if you could explain everything step by step what to do to fix this.

1 Answer 1

1

Each independent linter plugin for SublimeLinter 3 has its own dependencies/prerequisites. I would strongly recommend you to read carefully its specific installation and settings instructions on GitHub and the relevant SublimeLinter 3 new documentation if necessary, especially as this plugin was widely rewritten for Sublime Text 3.

For instance, your Windows SublimeLinter-php configuration seems correct: you just made your linter executable (here: php) directory available to SublimeLinter via your user settings, whatever your system PATH settings, which is the quickest and usually the easiest method.

On the other hand, the SublimeLinter-jshint plugin definetely requires besides its own installation (with Sublime Package Manager):

  1. properly installing Node.js and NPM: just grab and launch the latest Windows installer (msi file), which will setup both;

  2. and installing the jshint package via your terminal: npm install -g jshint.

It is pretty straightforward: your linter will work right after a Sublime Text restart. If need be, you will just have to configure jshint "lintering options" (most probably using .jshintrc files, without any Sublime Linter user setting needed).

Configuring sublimelinter-jsl is anothe case. It requires installing the relevant executable i.e. JavaScript Lint (which is not a node package), and ensuring that its path is available to SublimeLinter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.