diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index 4d1c749c8b58a2..0d819809931a96 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -13,7 +13,6 @@ overrides: - http/*.js - http2/*.js - path/*.js - - url/*.js rules: comma-dangle: [error, { arrays: always-multiline, diff --git a/benchmark/url/legacy-vs-whatwg-url-get-prop.js b/benchmark/url/legacy-vs-whatwg-url-get-prop.js index fe0c464f52b3c9..df888f13b98775 100644 --- a/benchmark/url/legacy-vs-whatwg-url-get-prop.js +++ b/benchmark/url/legacy-vs-whatwg-url-get-prop.js @@ -7,7 +7,7 @@ const assert = require('assert'); const bench = common.createBenchmark(main, { type: common.urlDataTypes, method: ['legacy', 'whatwg'], - e: [1] + e: [1], }); function useLegacy(data) { @@ -20,7 +20,7 @@ function useLegacy(data) { port: obj.port, pathname: obj.pathname, search: obj.search, - hash: obj.hash + hash: obj.hash, }; const len = data.length; // It's necessary to assign the values to an object @@ -51,7 +51,7 @@ function useWHATWG(data) { port: obj.port, pathname: obj.pathname, search: obj.search, - hash: obj.hash + hash: obj.hash, }; const len = data.length; bench.start(); diff --git a/benchmark/url/legacy-vs-whatwg-url-parse.js b/benchmark/url/legacy-vs-whatwg-url-parse.js index 94115d1305bb95..a54d81e15fd6ed 100644 --- a/benchmark/url/legacy-vs-whatwg-url-parse.js +++ b/benchmark/url/legacy-vs-whatwg-url-parse.js @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, { withBase: ['true', 'false'], type: common.urlDataTypes, e: [1], - method: ['legacy', 'whatwg'] + method: ['legacy', 'whatwg'], }); function useLegacy(data) { diff --git a/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js b/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js index fc21ea7c85d14b..fb2ce8ffa770d3 100644 --- a/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js +++ b/benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js @@ -6,7 +6,7 @@ const searchParams = common.searchParams; const bench = common.createBenchmark(main, { searchParam: Object.keys(searchParams), method: ['legacy', 'whatwg'], - n: [1e6] + n: [1e6], }); function useLegacy(n, input) { diff --git a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js index b9c2861719bc0f..171a8838a31ff6 100644 --- a/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-searchparams-serialize.js @@ -6,7 +6,7 @@ const searchParams = common.searchParams; const bench = common.createBenchmark(main, { searchParam: Object.keys(searchParams), method: ['legacy', 'whatwg'], - n: [1e6] + n: [1e6], }); function useLegacy(n, input, prop) { diff --git a/benchmark/url/legacy-vs-whatwg-url-serialize.js b/benchmark/url/legacy-vs-whatwg-url-serialize.js index e3254ede3acee8..b36cde12b70847 100644 --- a/benchmark/url/legacy-vs-whatwg-url-serialize.js +++ b/benchmark/url/legacy-vs-whatwg-url-serialize.js @@ -7,7 +7,7 @@ const assert = require('assert'); const bench = common.createBenchmark(main, { type: common.urlDataTypes, method: ['legacy', 'whatwg'], - e: [1] + e: [1], }); function useLegacy(data) { diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js index be5632d2b67367..d5cda90f72a2ea 100644 --- a/benchmark/url/url-format.js +++ b/benchmark/url/url-format.js @@ -9,7 +9,7 @@ const inputs = { const bench = common.createBenchmark(main, { type: Object.keys(inputs), - n: [25e6] + n: [25e6], }); function main({ type, n }) { diff --git a/benchmark/url/url-parse.js b/benchmark/url/url-parse.js index b3e83188b2192f..163dd790f8142b 100644 --- a/benchmark/url/url-parse.js +++ b/benchmark/url/url-parse.js @@ -4,12 +4,12 @@ const url = require('url'); const inputs = { normal: 'http://foo.com/bar', - escaped: 'https://foo.bar/{}^`/abcd' + escaped: 'https://foo.bar/{}^`/abcd', }; const bench = common.createBenchmark(main, { type: Object.keys(inputs), - n: [1e7] + n: [1e7], }); function main({ type, n }) { diff --git a/benchmark/url/url-resolve.js b/benchmark/url/url-resolve.js index 9f6e958a00bba0..9f33dea70e70d6 100644 --- a/benchmark/url/url-resolve.js +++ b/benchmark/url/url-resolve.js @@ -9,13 +9,13 @@ const paths = { 'sibling': '../foo/bar?baz=boom', 'foo/bar': 'foo/bar', 'withscheme': 'http://nodejs.org', - 'down': './foo/bar?baz' + 'down': './foo/bar?baz', }; const bench = common.createBenchmark(main, { href: Object.keys(hrefs), path: Object.keys(paths), - n: [1e5] + n: [1e5], }); function main({ n, href, path }) { diff --git a/benchmark/url/url-searchparams-iteration.js b/benchmark/url/url-searchparams-iteration.js index ce530c5227fab3..89f78fb16841a4 100644 --- a/benchmark/url/url-searchparams-iteration.js +++ b/benchmark/url/url-searchparams-iteration.js @@ -4,7 +4,7 @@ const assert = require('assert'); const bench = common.createBenchmark(main, { loopMethod: ['forEach', 'iterator'], - n: [1e6] + n: [1e6], }); const str = 'one=single&two=first&three=first&two=2nd&three=2nd&three=3rd'; diff --git a/benchmark/url/url-searchparams-read.js b/benchmark/url/url-searchparams-read.js index e1cb39fbe71cd8..26d3a0223be852 100644 --- a/benchmark/url/url-searchparams-read.js +++ b/benchmark/url/url-searchparams-read.js @@ -4,7 +4,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { accessMethod: ['get', 'getAll', 'has'], param: ['one', 'two', 'three', 'nonexistent'], - n: [2e7] + n: [2e7], }); const str = 'one=single&two=first&three=first&two=2nd&three=2nd&three=3rd'; diff --git a/benchmark/url/url-searchparams-sort.js b/benchmark/url/url-searchparams-sort.js index a1873fd612f873..fcd55cd397950f 100644 --- a/benchmark/url/url-searchparams-sort.js +++ b/benchmark/url/url-searchparams-sort.js @@ -13,7 +13,7 @@ const inputs = { // 88 parameters long: 'g&r&t&h&s&r&d&w&b&n&h&k&x&m&k&h&o&e&x&c&c&g&e&b&p&p&s&n&j&b&y&z&' + 'u&l&o&r&w&a&u&l&m&f&j&q&p&f&e&y&e&n&e&l&m&w&u&w&t&n&t&q&v&y&c&o&' + - 'k&f&j&i&l&m&g&j&d&i&z&q&p&x&q&q&d&n&y&w&g&i&v&r' + 'k&f&j&i&l&m&g&j&d&i&z&q&p&x&q&q&d&n&y&w&g&i&v&r', }; function getParams(str) { @@ -26,9 +26,9 @@ function getParams(str) { const bench = common.createBenchmark(main, { type: Object.keys(inputs), - n: [1e6] + n: [1e6], }, { - flags: ['--expose-internals'] + flags: ['--expose-internals'], }); function main({ type, n }) { diff --git a/benchmark/url/usvstring.js b/benchmark/url/usvstring.js index 37141ff5512249..93a50846fb999f 100644 --- a/benchmark/url/usvstring.js +++ b/benchmark/url/usvstring.js @@ -7,13 +7,13 @@ const inputs = { '\ud800\udfff', someinvalid: 'asasfdfasd\uda23', allinvalid: '\udc45\uda23 \udf00\udc00 \udfaa\uda12 \udc00\udfaa', - nonstring: { toString() { return 'asdf'; } } + nonstring: { toString() { return 'asdf'; } }, }; const bench = common.createBenchmark(main, { input: Object.keys(inputs), - n: [5e7] + n: [5e7], }, { - flags: ['--expose-internals'] + flags: ['--expose-internals'], }); function main({ input, n }) { diff --git a/benchmark/url/whatwg-url-idna.js b/benchmark/url/whatwg-url-idna.js index 853a19776df5d2..0f4139fc02bb2f 100644 --- a/benchmark/url/whatwg-url-idna.js +++ b/benchmark/url/whatwg-url-idna.js @@ -5,30 +5,30 @@ const { domainToASCII, domainToUnicode } = require('url'); const domains = { empty: { ascii: '', - unicode: '' + unicode: '', }, none: { ascii: 'passports', - unicode: 'passports' + unicode: 'passports', }, some: { ascii: 'Paßstraße', - unicode: 'xn--Pastrae-1vae' + unicode: 'xn--Pastrae-1vae', }, all: { ascii: '他们不说中文', - unicode: 'xn--ihqwczyycu19kkg2c' + unicode: 'xn--ihqwczyycu19kkg2c', }, nonstring: { ascii: { toString() { return ''; } }, - unicode: { toString() { return ''; } } - } + unicode: { toString() { return ''; } }, + }, }; const bench = common.createBenchmark(main, { domain: Object.keys(domains), to: ['ascii', 'unicode'], - n: [5e6] + n: [5e6], }); function main({ n, to, domain }) { diff --git a/benchmark/url/whatwg-url-properties.js b/benchmark/url/whatwg-url-properties.js index f0ba2931e51f1e..0c1bc225ba1985 100644 --- a/benchmark/url/whatwg-url-properties.js +++ b/benchmark/url/whatwg-url-properties.js @@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { e: [1], prop: ['href', 'origin', 'protocol', 'username', 'password', 'host', 'hostname', 'port', - 'pathname', 'search', 'searchParams', 'hash'] + 'pathname', 'search', 'searchParams', 'hash'], }); function setAndGet(data, prop) {