Skip to content

Commit

Permalink
benchmark,lib,test,tools: use consistent quotes
Browse files Browse the repository at this point in the history
In preparation for a linting rule, use consistent quotation for
properties in objects.

PR-URL: nodejs#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>
  • Loading branch information
Trott committed Mar 8, 2018
1 parent 282e65c commit 3c31bff
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion benchmark/querystring/querystring-stringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function main({ type, n }) {
encodemany: {
'\u0080\u0083\u0089': 'bar',
'\u008C\u008E\u0099': 'quux',
xyzzy: '\u00A5q\u00A3r'
'xyzzy': '\u00A5q\u00A3r'
},
encodelast: {
foo: 'bar',
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/loader/DefaultResolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function search(target, base) {
}

const extensionFormatMap = {
__proto__: null,
'__proto__': null,
'.mjs': 'esm',
'.json': 'json',
'.node': 'addon',
Expand Down
4 changes: 2 additions & 2 deletions test/doctool/test-doctool-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ const testData = [
meta: {
added: ['v5.3.0', 'v4.2.0'],
changes: [
{ version: 'v4.2.0',
{ 'version': 'v4.2.0',
'pr-url': 'https://github.com/nodejs/node/pull/3276',
description: 'The `error` parameter can now be ' +
'description': 'The `error` parameter can now be ' +
'an arrow function.'
}
]
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-client-headers-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function execute(options) {
http.createServer(function(req, res) {
const expectHeaders = {
'x-foo': 'boom',
cookie: 'a=1; b=2; c=3',
connection: 'close'
'cookie': 'a=1; b=2; c=3',
'connection': 'close'
};

// no Host header when you set headers an array
Expand Down
10 changes: 5 additions & 5 deletions test/parallel/test-http-raw-headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ http.createServer(function(req, res) {
'close'
];
const expectHeaders = {
host: `localhost:${this.address().port}`,
'host': `localhost:${this.address().port}`,
'transfer-encoding': 'CHUNKED',
'x-bar': 'yoyoyo',
connection: 'close'
'connection': 'close'
};
const expectRawTrailers = [
'x-bAr',
Expand Down Expand Up @@ -96,9 +96,9 @@ http.createServer(function(req, res) {
'chunked'
];
const expectHeaders = {
trailer: 'x-foo',
date: null,
connection: 'close',
'trailer': 'x-foo',
'date': null,
'connection': 'close',
'transfer-encoding': 'chunked'
};
res.rawHeaders[3] = null;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-compat-expect-continue-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ server.listen(0, common.mustCall(() => {
const client = http2.connect(`http://localhost:${server.address().port}`);
const req = client.request({
':method': 'POST',
expect: '100-continue'
'expect': '100-continue'
});

let gotContinue = false;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-compat-expect-continue.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ server.on('listening', common.mustCall(() => {
const client = http2.connect(`http://localhost:${server.address().port}`);
const req = client.request({
':method': 'POST',
expect: '100-continue'
'expect': '100-continue'
});

let gotContinue = false;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-compat-expect-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function nextTest(testsToRun) {
':method': 'GET',
':scheme': 'http',
':authority': `localhost:${port}`,
expect: expectValue
'expect': expectValue
});

req.on('response', common.mustCall((headers) => {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http2-cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ server.on('listening', common.mustCall(() => {

const req = client.request({
':path': '/',
abc: [1, 2, 3],
cookie: ['a=b', 'c=d', 'e=f'],
'abc': [1, 2, 3],
'cookie': ['a=b', 'c=d', 'e=f'],
});
req.resume();

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-server-rst-before-respond.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function onStream(stream, headers, flags) {
common.expectsError(() => {
stream.additionalHeaders({
':status': 123,
abc: 123
'abc': 123
});
}, { code: 'ERR_HTTP2_INVALID_STREAM' });
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-server-rst-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ server.listen(0, common.mustCall(() => {
tests.forEach((test) => {
const req = client.request({
':method': 'POST',
rstcode: test[0]
'rstcode': test[0]
});
req.on('close', common.mustCall((code) => {
assert.strictEqual(code, test[0]);
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-querystring.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ const qsTestCases = [
['foo&bar=baz', 'foo=&bar=baz', { foo: '', bar: 'baz' }],
['a=b&c&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
['a=b&c=&d=e', 'a=b&c=&d=e', { a: 'b', c: '', d: 'e' }],
['a=b&=c&d=e', 'a=b&=c&d=e', { a: 'b', '': 'c', d: 'e' }],
['a=b&=&c=d', 'a=b&=&c=d', { a: 'b', '': '', c: 'd' }],
['a=b&=c&d=e', 'a=b&=c&d=e', { 'a': 'b', '': 'c', 'd': 'e' }],
['a=b&=&c=d', 'a=b&=&c=d', { 'a': 'b', '': '', 'c': 'd' }],
['&&foo=bar&&', 'foo=bar', { foo: 'bar' }],
['&', '', {}],
['&&&&', '', {}],
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-module-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function circular() {

async function circular2() {
const sourceMap = {
root: `
'root': `
import * as a from './a.mjs';
import * as b from './b.mjs';
if (!('fromA' in a))
Expand Down
8 changes: 4 additions & 4 deletions tools/eslint-rules/no-unescaped-regexp-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ module.exports = function(context) {
}

return {
TemplateLiteral: checkLiteral,
Literal: checkLiteral,
CallExpression: checkRegExpStart,
NewExpression: checkRegExpStart,
'TemplateLiteral': checkLiteral,
'Literal': checkLiteral,
'CallExpression': checkRegExpStart,
'NewExpression': checkRegExpStart,
'CallExpression:exit': checkRegExpEnd,
'NewExpression:exit': checkRegExpEnd
};
Expand Down

0 comments on commit 3c31bff

Please sign in to comment.