Skip to content

Commit 563bed0

Browse files
TrottMylesBorins
authored andcommitted
benchmark,lib,test,tools: use consistent quotes
In preparation for a linting rule, use consistent quotation for properties in objects. PR-URL: #19156 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 84acb9f commit 563bed0

14 files changed

+25
-25
lines changed

benchmark/querystring/querystring-stringify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function main({ type, n }) {
1717
encodemany: {
1818
'\u0080\u0083\u0089': 'bar',
1919
'\u008C\u008E\u0099': 'quux',
20-
xyzzy: '\u00A5q\u00A3r'
20+
'xyzzy': '\u00A5q\u00A3r'
2121
},
2222
encodelast: {
2323
foo: 'bar',

lib/internal/loader/DefaultResolve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function search(target, base) {
4040
}
4141

4242
const extensionFormatMap = {
43-
__proto__: null,
43+
'__proto__': null,
4444
'.mjs': 'esm',
4545
'.json': 'json',
4646
'.node': 'addon',

test/doctool/test-doctool-json.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ const testData = [
102102
meta: {
103103
added: ['v5.3.0', 'v4.2.0'],
104104
changes: [
105-
{ version: 'v4.2.0',
105+
{ 'version': 'v4.2.0',
106106
'pr-url': 'https://github.com/nodejs/node/pull/3276',
107-
description: 'The `error` parameter can now be ' +
107+
'description': 'The `error` parameter can now be ' +
108108
'an arrow function.'
109109
}
110110
]

test/parallel/test-http-client-headers-array.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ function execute(options) {
99
http.createServer(function(req, res) {
1010
const expectHeaders = {
1111
'x-foo': 'boom',
12-
cookie: 'a=1; b=2; c=3',
13-
connection: 'close'
12+
'cookie': 'a=1; b=2; c=3',
13+
'connection': 'close'
1414
};
1515

1616
// no Host header when you set headers an array

test/parallel/test-http-raw-headers.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ http.createServer(function(req, res) {
3737
'close'
3838
];
3939
const expectHeaders = {
40-
host: `localhost:${this.address().port}`,
40+
'host': `localhost:${this.address().port}`,
4141
'transfer-encoding': 'CHUNKED',
4242
'x-bar': 'yoyoyo',
43-
connection: 'close'
43+
'connection': 'close'
4444
};
4545
const expectRawTrailers = [
4646
'x-bAr',
@@ -96,9 +96,9 @@ http.createServer(function(req, res) {
9696
'chunked'
9797
];
9898
const expectHeaders = {
99-
trailer: 'x-foo',
100-
date: null,
101-
connection: 'close',
99+
'trailer': 'x-foo',
100+
'date': null,
101+
'connection': 'close',
102102
'transfer-encoding': 'chunked'
103103
};
104104
res.rawHeaders[3] = null;

test/parallel/test-http2-compat-expect-continue-check.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ server.listen(0, common.mustCall(() => {
3333
const client = http2.connect(`http://localhost:${server.address().port}`);
3434
const req = client.request({
3535
':method': 'POST',
36-
expect: '100-continue'
36+
'expect': '100-continue'
3737
});
3838

3939
let gotContinue = false;

test/parallel/test-http2-compat-expect-continue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ server.on('listening', common.mustCall(() => {
2929
const client = http2.connect(`http://localhost:${server.address().port}`);
3030
const req = client.request({
3131
':method': 'POST',
32-
expect: '100-continue'
32+
'expect': '100-continue'
3333
});
3434

3535
let gotContinue = false;

test/parallel/test-http2-compat-expect-handling.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function nextTest(testsToRun) {
3030
':method': 'GET',
3131
':scheme': 'http',
3232
':authority': `localhost:${port}`,
33-
expect: expectValue
33+
'expect': expectValue
3434
});
3535

3636
req.on('response', common.mustCall((headers) => {

test/parallel/test-http2-cookies.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ server.on('listening', common.mustCall(() => {
4141

4242
const req = client.request({
4343
':path': '/',
44-
abc: [1, 2, 3],
45-
cookie: ['a=b', 'c=d', 'e=f'],
44+
'abc': [1, 2, 3],
45+
'cookie': ['a=b', 'c=d', 'e=f'],
4646
});
4747
req.resume();
4848

test/parallel/test-http2-server-rst-before-respond.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function onStream(stream, headers, flags) {
1717
common.expectsError(() => {
1818
stream.additionalHeaders({
1919
':status': 123,
20-
abc: 123
20+
'abc': 123
2121
});
2222
}, { code: 'ERR_HTTP2_INVALID_STREAM' });
2323
}

test/parallel/test-http2-server-rst-stream.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ server.listen(0, common.mustCall(() => {
4040
tests.forEach((test) => {
4141
const req = client.request({
4242
':method': 'POST',
43-
rstcode: test[0]
43+
'rstcode': test[0]
4444
});
4545
req.on('close', common.mustCall((code) => {
4646
assert.strictEqual(code, test[0]);

test/parallel/test-querystring.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ const qsTestCases = [
7575
['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }],
7676
['a=b&c&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
7777
['a=b&c=&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
78-
['a=b&=c&d=e', 'a=b&=c&d=e', { a: 'b', '': 'c', d: 'e' }],
79-
['a=b&=&c=d', 'a=b&=&c=d', { a: 'b', '': '', c: 'd' }],
78+
['a=b&=c&d=e', 'a=b&=c&d=e', { 'a': 'b', '': 'c', 'd': 'e' }],
79+
['a=b&=&c=d', 'a=b&=&c=d', { 'a': 'b', '': '', 'c': 'd' }],
8080
['&&foo=bar&&', 'foo=bar', { foo: 'bar' }],
8181
['&', '', {}],
8282
['&&&&', '', {}],

test/parallel/test-vm-module-link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async function circular() {
8888

8989
async function circular2() {
9090
const sourceMap = {
91-
root: `
91+
'root': `
9292
import * as a from './a.mjs';
9393
import * as b from './b.mjs';
9494
if (!('fromA' in a))

tools/eslint-rules/no-unescaped-regexp-dot.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ module.exports = function(context) {
120120
}
121121

122122
return {
123-
TemplateLiteral: checkLiteral,
124-
Literal: checkLiteral,
125-
CallExpression: checkRegExpStart,
126-
NewExpression: checkRegExpStart,
123+
'TemplateLiteral': checkLiteral,
124+
'Literal': checkLiteral,
125+
'CallExpression': checkRegExpStart,
126+
'NewExpression': checkRegExpStart,
127127
'CallExpression:exit': checkRegExpEnd,
128128
'NewExpression:exit': checkRegExpEnd
129129
};

0 commit comments

Comments
 (0)