Closed iwehrman closed 8 years ago
@iwehrman thanks for upgrading and fixing all the issues. eslint
looks pretty sweet! :+1: Before merging, I noticed some new idention problems due to the changes, so back to you.
@shaoshing @volfied: thanks for taking a look. In some cases I agree that the indentation is incorrect but in most cases I think eslint is putting things in the "correct" place. In particular, I think this is "correct":
var foo = new Promise(function (resolve) {
resolve();
})
.bind(this);
At least, I think this formatting is a valid consequence of the four-space indentation rule that eslint is enforcing. At first I didn't like it, but now I think it's actually reasonable. In any case, I'm not sure how I would explain to eslint that it should be any other way. (JSCS is agnostic about this; it accepts either indentation.)
I'll look into fixing the other issues, but in the meantime, what's your reaction to that?
(Also, I agree with the @shaoshing's suggested formatting workaround when it's possible.)
OK, I've used @shaoshing's suggested workaround for all the oddities he pointed out. Back to @shaoshing!
Superb!
But don't forget adobe-photoshop/spaces-adapter#183 :)
This PR replaces our
jshint
grunt task with an improvedeslint
grunt task. eslint is better for three reasons:As a result of 2) above, many indentation errors had to be fixed. eslint also caught a number of instances of unused variables, some of which were genuine bugs. (Related to that, see #3639.)
To make the linters work correctly with ST3, use Package Control to install Babel, SublimeLinter, SublimeLinter-jscs and SublimeLinter-contrib-eslint. Next, globally install jscs and eslint globally with
npm install -g jscs eslint
. You should verify that the globally installed versions are approximately the same as the dependencies of our grunt tasks. (I.e., if you had an old version installed globally,npm install
won't necessarily update it.)