summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-03 17:15:45 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-10 17:07:18 +0100
commit1f85ea979ccef3c52ec4ca3263306e527b625498 (patch)
treef318be6ee905b1a04d1d2db859720c4b33b22aa8 /lib/url.js
parentcc8250fab86486632fdeb63892be735d7628cd13 (diff)
downloadandroid-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.tar.gz
android-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.tar.bz2
android-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.zip
tools: capitalize sentences
This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/url.js b/lib/url.js
index eac9d1511b..29dec5cc5f 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -461,7 +461,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
this.path = p + s;
}
- // finally, reconstruct the href based on what has been validated.
+ // Finally, reconstruct the href based on what has been validated.
this.href = this.format();
return this;
};
@@ -629,7 +629,7 @@ Url.prototype.format = function format() {
pathname = newPathname;
}
- // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
+ // Only the slashedProtocols get the //. Not mailto:, xmpp:, etc.
// unless they had them to begin with.
if (this.slashes || slashedProtocol.has(protocol)) {
if (this.slashes || host) {
@@ -686,7 +686,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
// even href="" will remove it.
result.hash = relative.hash;
- // if the relative url is empty, then there's nothing left to do here.
+ // If the relative url is empty, then there's nothing left to do here.
if (relative.href === '') {
result.href = result.format();
return result;
@@ -888,7 +888,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
}
}
- // if the path is allowed to go above the root, restore leading ..s
+ // If the path is allowed to go above the root, restore leading ..s
if (!mustEndAbs && !removeAllDots) {
while (up--) {
srcPath.unshift('..');