73rhodes / Sublime-JSLint

JSLint for Sublime Text 2 and 3.
80 stars 14 forks source link

Not working for me (suddenly) on OSX, Sublime Text 3 #50

Open fleep opened 9 years ago

fleep commented 9 years ago

I have completely wiped and reinstalled this package to be sure nothing was corrupted. It seems to be sending the correct query on the command line to jslint.js (I am using the one provided with the package), and passing along the correct declarations - but it's not working regardless.

Here is an example file:

console.log(window.document);

Here are the errors that the JSLint package is returning when I save it:

/Users/fleep/example.js
 #1 Undeclared 'console'.
    console.log(window.document); // Line 1, Pos 1
 #2 Undeclared 'window'.
    console.log(window.document); // Line 1, Pos 13
[Finished in 0.1s]

Here is my USER Settings file:

{
    "options" : [
        "--this", "true",
        "--todo", "true",
        "--white", "true",
        "--nomen", "true",
        "--plusplus", "true",
        "--browser", "true",
        "--predef", "['console']"
        //"--indent", 0,
    ]
}

and here is what's being executed according to ST3's console:

Running node /Users/fleep/Library/Application Support/Sublime Text 3/Packages/JSLint/linter.js --this true --todo true --white true --nomen true --plusplus true --browser true --predef ['console'] /Users/fleep/example.js

With browser set to "true" and "console" in the --predef options, I shouldn't be getting either of the errors I'm seeing for the posted example. What gives?

jerjako commented 9 years ago

Same here, last week, no error. And today, 44 error in a file.

function template() {
    return this;    
}

Show

Unexpected 'this'.
Fasani commented 9 years ago

@jerjako @fleep Exact same for me ddid you get a fix?

73rhodes commented 9 years ago

JSLint itself no longer supports some of those options. It has gotten a lot more opinionated. Fortunately you can install whatever version of JSLint you want on your system and point the config file at it.

73rhodes commented 9 years ago

refer to https://github.com/douglascrockford/JSLint/commit/f819cf3c65d07086cf217c549c577fa77dc65fc9#commitcomment-14603692