-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: update eslint to v1.x #2286
Conversation
I don't think we need |
So we just remove |
Patch doesn't seem to apply cleanly for me:
Did you install the new eslint with |
I did this:
|
Yeah. You could experiment with these options thought: quote-props: [2, "as-needed"]
quote-props: [2, "consistent-as-needed"] |
Also, please remove |
I have one remaining issue with the indent rule and I don't know if it's on our side or eslint's: exec('python -c "print 200000*\'C\'"', {maxBuffer: 1000},
function(err, stdout, stderr) {
assert.ok(err);
assert.ok(/maxBuffer/.test(err.message));
});
|
done |
If that's the only case, I'd say refactor to a function expression ( |
You could make that |
Also, I'd suggest doing |
Isn't it the default behavior ? I don't see dev deps in
I did it like that on last update, thanks for the tip ! |
You're right, I think npm did at some point install devDependencies when that variable wasn't set, but it seems fine now. |
#2205 depends on this. |
I'm not sure about the |
Yes those tests are the only ones with non indented switch cases. (Do not lose too much time reviewing until eslint is fixed upstream) |
56fe182
to
b18a2e9
Compare
Updated to v1.1.0. A bunch of issues have been fixed but there are new ones :( |
Still blocked on eslint/eslint#3173 from what I followed. |
With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
Replace var keyword with const or let. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
On case-insensitive platorms, the Debug/ rule catches the debug module under npm and eslint. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
Replace var keyword with const or let. PR-URL: #2286 Reviewed-By: Roman Reiss <me@silverwind.io>
On case-insensitive platorms, the Debug/ rule catches the debug module under npm and eslint. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
Replace var keyword with const or let. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
On case-insensitive platorms, the Debug/ rule catches the debug module under npm and eslint. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
Replace var keyword with const or let. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
On case-insensitive platorms, the Debug/ rule catches the debug module under npm and eslint. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
With an indentation style of two spaces, it is not possible to indent multiline variable declarations by four spaces. Instead, the var keyword is used on every new line. Use const instead of var where applicable for changed lines. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
Replace var keyword with const or let. PR-URL: nodejs#2286 Reviewed-By: Roman Reiss <me@silverwind.io>
This is still a WIP.
I create the PR now because there are several issues to discuss:
no-reserved-keys
rule has been removed. It is kind of replaced byquote-props
but to enable this rule, we need to choose how we want deal with quotes on object properties. Theconsistent
option seems to be the most conservative one if the goal is to limit changes in our code.indent
rule changed quite a lot and has now options to control the indentation of specific cases:SwitchCase
: I set it to 1, meaning that thecase
statements need 1 level of indent (== 2 spaces) compared to theswitch
. There are a few places where we don't follow this rule, like here.VariableDeclarator
: I set it to 2. This allows us to align multiple variable declarations withvar
orlet
like:I haven't pushed the lib and test changes yet because I think there are some problems in eslint with the indent rule. I'll reference this PR when I file the issues.