victorporof/Sublime-JSHint

`lint_on_save: true` does not lint when saving file

Closed this issue · 4 comments

I can lint when I execute Tools / JSHint / Lint Code. However I can't make it work running the linter when saving a file. This is my config file:

{
  // Simply using `node` without specifying a path sometimes doesn't work :(
  // https://github.com/victorporof/Sublime-JSHint#oh-noez-command-not-found
  // http://nodejs.org/#download
  "node_path": {
    "windows": "C:/Program Files/nodejs/node.exe",
    "linux": "/usr/bin/nodejs",
    "osx": "/usr/local/bin/node"
  },

  // Automatically lint on edit (Sublime Text 3 only).
  "lint_on_edit": false,

  // Configurable duration before re-linting.
  "lint_on_edit_timeout": 1,

  // Automatically lint when a file is loaded.
  "lint_on_load": false,

  // Automatically lint when a file is saved.
  "lint_on_save": true,

  // Highlight problematic regions when selected.
  "highlight_selected_regions": false,

  // Log the settings passed to JSHint from `.jshintrc`.
  "print_diagnostics": true
}

I re-started Sublime, but no luck. I'm running Sublime 2.0.2 on Mac OS X Mavericks.

Weird, it works for me for Sublime 3. Can you verify if it works properly for Sublime 3, so we can rule out an OS issue?

Sublime 3, Ubuntu 14.04, needed to restart Sublime, but then it worked just fine.

Closing, as a Sublime restart fixed it.

Sorry to interrupt, just making sure: I am not the original poster, I just wanted to give some additional information :-). If the problem was solved for the original poster by a restart, just ignore this post ...