From 07d8690c364ce39a47b8375299be8ca2414f882c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 14 Feb 2023 18:09:42 +0100 Subject: [PATCH] benchmark: add trailing commas in `benchmark/path` PR-URL: https://github.com/nodejs/node/pull/46628 Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Moshe Atlow --- benchmark/.eslintrc.yaml | 12 ------------ benchmark/path/basename-posix.js | 2 +- benchmark/path/basename-win32.js | 2 +- benchmark/path/dirname-posix.js | 2 +- benchmark/path/dirname-win32.js | 2 +- benchmark/path/extname-posix.js | 2 +- benchmark/path/extname-win32.js | 2 +- benchmark/path/format-posix.js | 2 +- benchmark/path/format-win32.js | 2 +- benchmark/path/isAbsolute-posix.js | 2 +- benchmark/path/isAbsolute-win32.js | 2 +- benchmark/path/join-posix.js | 2 +- benchmark/path/join-win32.js | 2 +- benchmark/path/makeLong-win32.js | 2 +- benchmark/path/normalize-posix.js | 2 +- benchmark/path/normalize-win32.js | 2 +- benchmark/path/parse-posix.js | 2 +- benchmark/path/parse-win32.js | 2 +- benchmark/path/relative-posix.js | 2 +- benchmark/path/relative-win32.js | 2 +- benchmark/path/resolve-posix.js | 2 +- benchmark/path/resolve-win32.js | 2 +- 22 files changed, 21 insertions(+), 33 deletions(-) diff --git a/benchmark/.eslintrc.yaml b/benchmark/.eslintrc.yaml index 6b97461975f1c0..aa014eec4e3627 100644 --- a/benchmark/.eslintrc.yaml +++ b/benchmark/.eslintrc.yaml @@ -6,15 +6,3 @@ env: rules: prefer-arrow-callback: error - -overrides: - - files: - - path/*.js - rules: - comma-dangle: [error, { - arrays: always-multiline, - exports: always-multiline, - functions: only-multiline, - imports: always-multiline, - objects: only-multiline, - }] diff --git a/benchmark/path/basename-posix.js b/benchmark/path/basename-posix.js index 6600068d4c53f6..8478ce8734efdb 100644 --- a/benchmark/path/basename-posix.js +++ b/benchmark/path/basename-posix.js @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, { '/foo/bar/baz/asdf/quux.html', ['/foo/bar/baz/asdf/quux.html', '.html'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, pathext }) { diff --git a/benchmark/path/basename-win32.js b/benchmark/path/basename-win32.js index dc26a134e29252..2d93fde453113f 100644 --- a/benchmark/path/basename-win32.js +++ b/benchmark/path/basename-win32.js @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, { '\\foo\\bar\\baz\\asdf\\quux.html', ['\\foo\\bar\\baz\\asdf\\quux.html', '.html'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, pathext }) { diff --git a/benchmark/path/dirname-posix.js b/benchmark/path/dirname-posix.js index c98753562fbc93..29c374dba987d7 100644 --- a/benchmark/path/dirname-posix.js +++ b/benchmark/path/dirname-posix.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { 'foo/bar', '/foo/bar/baz/asdf/quux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/dirname-win32.js b/benchmark/path/dirname-win32.js index 9eb5478b3b4d3b..28e6f3564b63ce 100644 --- a/benchmark/path/dirname-win32.js +++ b/benchmark/path/dirname-win32.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { 'foo\\bar', 'D:\\foo\\bar\\baz\\asdf\\quux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/extname-posix.js b/benchmark/path/extname-posix.js index 0e01d59a745883..b2aae0647f01b9 100644 --- a/benchmark/path/extname-posix.js +++ b/benchmark/path/extname-posix.js @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, { '/foo/bar/baz/asdf/quux', '/foo/bar/baz/asdf/quux.foobarbazasdfquux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/extname-win32.js b/benchmark/path/extname-win32.js index 6d8437e5c5d819..1a4e6f73c7d341 100644 --- a/benchmark/path/extname-win32.js +++ b/benchmark/path/extname-win32.js @@ -15,7 +15,7 @@ const bench = common.createBenchmark(main, { 'D:\\foo\\bar\\baz\\asdf\\quux', '\\foo\\bar\\baz\\asdf\\quux.foobarbazasdfquux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/format-posix.js b/benchmark/path/format-posix.js index 7720bbc3b705ed..0076f041e92038 100644 --- a/benchmark/path/format-posix.js +++ b/benchmark/path/format-posix.js @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { props: [ ['/', '/home/user/dir', 'index.html', '.html', 'index'].join('|'), ], - n: [1e6] + n: [1e6], }); function main({ n, props }) { diff --git a/benchmark/path/format-win32.js b/benchmark/path/format-win32.js index fab7599ab58386..70f7070147c2f2 100644 --- a/benchmark/path/format-win32.js +++ b/benchmark/path/format-win32.js @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { props: [ ['C:\\', 'C:\\path\\dir', 'index.html', '.html', 'index'].join('|'), ], - n: [1e6] + n: [1e6], }); function main({ n, props }) { diff --git a/benchmark/path/isAbsolute-posix.js b/benchmark/path/isAbsolute-posix.js index 90d06502d1fb02..3c70aacc14d37b 100644 --- a/benchmark/path/isAbsolute-posix.js +++ b/benchmark/path/isAbsolute-posix.js @@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, { '/baz/..', 'bar/baz', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/isAbsolute-win32.js b/benchmark/path/isAbsolute-win32.js index 15da64f5e973a3..494f419b7b103e 100644 --- a/benchmark/path/isAbsolute-win32.js +++ b/benchmark/path/isAbsolute-win32.js @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { 'C:baz\\..', 'bar\\baz', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/join-posix.js b/benchmark/path/join-posix.js index 6619e4dea852db..2e7836650af455 100644 --- a/benchmark/path/join-posix.js +++ b/benchmark/path/join-posix.js @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { paths: [ ['/foo', 'bar', '', 'baz/asdf', 'quux', '..'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) { diff --git a/benchmark/path/join-win32.js b/benchmark/path/join-win32.js index 958dee706d499a..3ad1c0c7ba2a61 100644 --- a/benchmark/path/join-win32.js +++ b/benchmark/path/join-win32.js @@ -6,7 +6,7 @@ const bench = common.createBenchmark(main, { paths: [ ['C:\\foo', 'bar', '', 'baz\\asdf', 'quux', '..'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) { diff --git a/benchmark/path/makeLong-win32.js b/benchmark/path/makeLong-win32.js index 864a9cfffe63b9..5ac515cb2aac8d 100644 --- a/benchmark/path/makeLong-win32.js +++ b/benchmark/path/makeLong-win32.js @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, { '\\\\foo\\bar', '\\\\?\\foo', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/normalize-posix.js b/benchmark/path/normalize-posix.js index e0722097025020..3e90bfc21aec46 100644 --- a/benchmark/path/normalize-posix.js +++ b/benchmark/path/normalize-posix.js @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { '/foo/bar', '/foo/bar//baz/asdf/quux/..', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/normalize-win32.js b/benchmark/path/normalize-win32.js index 84e16ca3c2d0e9..33af7953ff547d 100644 --- a/benchmark/path/normalize-win32.js +++ b/benchmark/path/normalize-win32.js @@ -11,7 +11,7 @@ const bench = common.createBenchmark(main, { 'C:\\foo\\bar', 'C:\\foo\\bar\\\\baz\\asdf\\quux\\..', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/parse-posix.js b/benchmark/path/parse-posix.js index 7fb1d55099f722..550f900da3d782 100644 --- a/benchmark/path/parse-posix.js +++ b/benchmark/path/parse-posix.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { 'foo/bar', '/foo/bar/baz/asdf/.quux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/parse-win32.js b/benchmark/path/parse-win32.js index ea4bc34a849259..7173d1f8c4f382 100644 --- a/benchmark/path/parse-win32.js +++ b/benchmark/path/parse-win32.js @@ -13,7 +13,7 @@ const bench = common.createBenchmark(main, { 'foo\\bar', '\\foo\\bar\\baz\\asdf\\.quux', ], - n: [1e5] + n: [1e5], }); function main({ n, path }) { diff --git a/benchmark/path/relative-posix.js b/benchmark/path/relative-posix.js index 0285c2c968dcb2..cb8978087c99d6 100644 --- a/benchmark/path/relative-posix.js +++ b/benchmark/path/relative-posix.js @@ -12,7 +12,7 @@ const bench = common.createBenchmark(main, { ['/foo/bar/baz/quux', '/foo/bar/baz/quux'].join('|'), ['/foo/bar/baz/quux', '/var/log'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) { diff --git a/benchmark/path/relative-win32.js b/benchmark/path/relative-win32.js index 401919aa20d802..e513b828533ddb 100644 --- a/benchmark/path/relative-win32.js +++ b/benchmark/path/relative-win32.js @@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, { ['C:\\foo\\BAR\\BAZ', 'C:\\foo\\bar\\baz'].join('|'), ['C:\\foo\\bar\\baz\\quux', 'C:\\'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) { diff --git a/benchmark/path/resolve-posix.js b/benchmark/path/resolve-posix.js index dbae350c62a35f..4881947fe46b6d 100644 --- a/benchmark/path/resolve-posix.js +++ b/benchmark/path/resolve-posix.js @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, { ['foo/bar', '/tmp/file/', '..', 'a/../subfile'].join('|'), ['a/b/c/', '../../..'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) { diff --git a/benchmark/path/resolve-win32.js b/benchmark/path/resolve-win32.js index 7def7aa1025d50..822b98c2b86c52 100644 --- a/benchmark/path/resolve-win32.js +++ b/benchmark/path/resolve-win32.js @@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, { ['c:/ignore', 'd:\\a/b\\c/d', '\\e.exe'].join('|'), ['c:/blah\\blah', 'd:/games', 'c:../a'].join('|'), ], - n: [1e5] + n: [1e5], }); function main({ n, paths }) {