Uh oh!
There was an error while loading. Please reload this page.
tools: enable no-self-assign ESLint rule - #5552
Conversation
jasnell
commented
Mar 3, 2016
LGTM |
Trott
commented
Mar 3, 2016
cjihrig
commented
Mar 3, 2016
LGTM |
Trott
commented
Mar 4, 2016
CI failure looks infra related and unrelated to this change. Trying again: https://ci.nodejs.org/job/node-test-pull-request/1844/ |
jbergstroem
commented
Mar 4, 2016
LGTM |
silverwind
commented
Mar 5, 2016
There's two more links above pointing to Github, can you change them too while you're here? |
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code.
Trott
commented
Mar 5, 2016
@silverwind Sure, done. |
silverwind
commented
Mar 5, 2016
LGTM |
ronkorving
commented
Mar 7, 2016
Why the change of buffer-base64-decode.js? Seems a better fit for #5359. |
Trott
commented
Mar 7, 2016
@ronkorving asked:
I changed it because (due to |
ronkorving
commented
Mar 7, 2016
Oh wow. Alright 👍 |
targos
commented
Mar 7, 2016
LGTM |
targos
commented
Mar 7, 2016
IMO the warning in |
silverwind
commented
Mar 7, 2016
@targos you're right. The rule defines self-assignment as something that has no effect, but in this case it obviously has. Perf on the two methods is basically the same, so it doesn't matter much here though. |
Trott
commented
Mar 7, 2016
@targos@silverwind I agree, but in this particular case, the line being flagged is better as rewritten, so I'm OK with it. We are a couple versions behind on ESLint now. I wonder if a more recent release wouldn't flag it. |
targos
commented
Mar 7, 2016
I do not question your changes (I LGTM'd them after all). The file is indeed better rewritten. I was just mentioning it in case someone wants to file an issue in the ESLint repo. |
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: nodejs#5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Trott
commented
Mar 7, 2016
Landed in 810aa9f |
cjihrig
commented
Mar 7, 2016
It looks like this has been fixed in ESLint, and just hasn't been released yet - eslint/eslint#5371. |
cjihrig
commented
Mar 7, 2016
Sorry, the fix went out on March 4th in eslint@2.3.0. |
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: #5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: #5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: #5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: #5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: #5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
make -j8 test(UNIX) orvcbuild test nosign(Windows) pass withthis change (including linting)?
Enabled no-self-assign rule in ESLint.
This required one change in a benchmark file. Changed a loop (that is
outside of the benchmark itself, so performance is not critical) from a
for loop that repeats a string to use String.prototype.repeat() instead.
While at it, took the opportunity to const-ify the benchmark file.
Also moved the "Strict" section in the .eslintrc to match where it is in
the ESLint documentation. Updated the link for Strict rules to point to
the ESLint website rather than the GitHub-hosted code.