-
Notifications
You must be signed in to change notification settings - Fork 30k
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
repl, url, tools: use no-use-before-define ESLint rule #14032
Closed
vsemozhetbyt
wants to merge
2
commits into
nodejs:master
from
vsemozhetbyt:eslint-no-use-before-define
Closed
repl, url, tools: use no-use-before-define ESLint rule #14032
vsemozhetbyt
wants to merge
2
commits into
nodejs:master
from
vsemozhetbyt:eslint-no-use-before-define
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodejs-github-bot
added
dont-land-on-v4.x
repl
Issues and PRs related to the REPL subsystem.
tools
Issues and PRs related to the tools directory.
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
labels
Jul 1, 2017
CI: https://ci.nodejs.org/job/node-test-pull-request/8920/ All failed and unstable results seem unrelated. |
watilde
approved these changes
Jul 3, 2017
Pre-land CI: https://ci.nodejs.org/job/node-test-pull-request/8979/ One arm fail seems unrelated. |
Landed in 5100cc6 |
vsemozhetbyt
added a commit
that referenced
this pull request
Jul 4, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
addaleax
pushed a commit
that referenced
this pull request
Jul 11, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Merged
addaleax
pushed a commit
that referenced
this pull request
Jul 18, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Fishrock123
pushed a commit
that referenced
this pull request
Jul 19, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Aug 15, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Aug 15, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Aug 15, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Aug 16, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Sep 5, 2017
Also fix repl and url libs for the rule. PR-URL: #14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This was referenced Sep 5, 2017
This was referenced Sep 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
repl
Issues and PRs related to the REPL subsystem.
tools
Issues and PRs related to the tools directory.
whatwg-url
Issues and PRs related to the WHATWG URL implementation.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
repl, url, tools
Prehistory
In #14021, I've committed something like this by an oversight:
assert
andcommon
lines was erroneously swapped. All tests have failed except linter.ESLint has a rule for these cases: http://eslint.org/docs/rules/no-use-before-define
It has 3 options for classes, functions, and variables. I've left the class function on (defaults) as its violation is noted to be potentially dangerous. I've set the function option off as this is considered safe due to hoisting. And I've set the variable option off as we have many cases with cross-references from callbacks which are rather difficult to refactor. But with this option off, the rule will still check cases inside the same scope, like my above-mentioned error.
The first commit fixes 2 fragments in libs, the second one applies the rule.