Skip to content

Commit e3f9335

Browse files
committed
tools: re-enable comma-spacing linter rule
The rule was disabled because of an eslint bug which is now resolved. All code in lib was already conforming and only test code needed a few changes to make the linter happy with this rule enabled. Ref: eslint/eslint#2408 PR-URL: #2072 Reviewed-By: Yosuke Furukawa <[email protected]> Reviewed-by: Colin Ihrig <[email protected]> Reviewed-By: Alex Kocharin <[email protected]>
1 parent d91e10b commit e3f9335

11 files changed

+17
-18
lines changed

.eslintrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ rules:
4343
## 2 space indentation
4444
indent: [2, 2]
4545
## add space after comma
46-
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
47-
comma-spacing: 1
46+
comma-spacing: 2
4847
## put semi-colon
4948
semi: 2
5049
## require spaces operator like var sum = 1 + 1;

test/parallel/test-dgram-oob-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var assert = require('assert');
88
var dgram = require('dgram');
99

1010
var socket = dgram.createSocket('udp4');
11-
var buf = Buffer([1,2,3,4]);
11+
var buf = Buffer([1, 2, 3, 4]);
1212

1313
function ok() {}
1414
socket.send(buf, 0, 0, common.PORT, '127.0.0.1', ok); // useful? no

test/parallel/test-domain-http-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var http = require('http');
44
var assert = require('assert');
55
var common = require('../common');
66

7-
var objects = { foo: 'bar', baz: {}, num: 42, arr: [1,2,3] };
7+
var objects = { foo: 'bar', baz: {}, num: 42, arr: [1, 2, 3] };
88
objects.baz.asdf = objects;
99

1010
var serverCaught = 0;

test/parallel/test-fs-mkdir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ common.refreshTmpDir();
3636

3737
unlink(pathname);
3838

39-
fs.mkdir(pathname, 511 /*=0777*/, function(err) {
39+
fs.mkdir(pathname, 0o777, function(err) {
4040
assert.equal(err, null);
4141
assert.equal(common.fileExists(pathname), true);
4242
ncalls++;

test/parallel/test-http-server-multiheaders.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ srv.listen(common.PORT, function() {
3838
['www-authenticate', 'foo'],
3939
['WWW-Authenticate', 'bar'],
4040
['WWW-AUTHENTICATE', 'baz'],
41-
['proxy-authenticate','foo'],
42-
['Proxy-Authenticate','bar'],
43-
['PROXY-AUTHENTICATE','baz'],
41+
['proxy-authenticate', 'foo'],
42+
['Proxy-Authenticate', 'bar'],
43+
['PROXY-AUTHENTICATE', 'baz'],
4444
['x-foo', 'bingo'],
4545
['x-bar', 'banjo'],
4646
['x-bar', 'bango'],

test/parallel/test-sys.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ assert.equal('{ readonly: [Getter] }',
7575
common.inspect({get readonly() {}}));
7676

7777
assert.equal('{ readwrite: [Getter/Setter] }',
78-
common.inspect({get readwrite() {},set readwrite(val) {}}));
78+
common.inspect({get readwrite() {}, set readwrite(val) {}}));
7979

8080
assert.equal('{ writeonly: [Setter] }',
8181
common.inspect({set writeonly(val) {}}));

test/parallel/test-tls-npn-server-client.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ var clientsOptions = [{
4747
crl: serverOptions.crl,
4848
NPNProtocols: ['a', 'b', 'c'],
4949
rejectUnauthorized: false
50-
},{
50+
}, {
5151
port: serverPort,
5252
key: serverOptions.key,
5353
cert: serverOptions.cert,
5454
crl: serverOptions.crl,
5555
NPNProtocols: ['c', 'b', 'e'],
5656
rejectUnauthorized: false
57-
},{
57+
}, {
5858
port: serverPort,
5959
key: serverOptions.key,
6060
cert: serverOptions.cert,
6161
crl: serverOptions.crl,
6262
rejectUnauthorized: false
63-
},{
63+
}, {
6464
port: serverPort,
6565
key: serverOptions.key,
6666
cert: serverOptions.cert,

test/parallel/test-tls-session-cache.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ if (!common.hasCrypto) {
1111
process.exit();
1212
}
1313

14-
doTest({ tickets: false } , function() {
15-
doTest({ tickets: true } , function() {
14+
doTest({ tickets: false }, function() {
15+
doTest({ tickets: true }, function() {
1616
console.error('all done');
1717
});
1818
});

test/parallel/test-util-log.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var tests = [
2121
{input: function() {}, output: '[Function]'},
2222
{input: parseInt('not a number', 10), output: 'NaN'},
2323
{input: {answer: 42}, output: '{ answer: 42 }'},
24-
{input: [1,2,3], output: '[ 1, 2, 3 ]'}
24+
{input: [1, 2, 3], output: '[ 1, 2, 3 ]'}
2525
];
2626

2727
// test util.log()

test/parallel/test-zlib-dictionary-fail.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var zlib = require('zlib');
1212
}));
1313

1414
// String "test" encoded with dictionary "dict".
15-
stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5]));
15+
stream.write(Buffer([0x78, 0xBB, 0x04, 0x09, 0x01, 0xA5]));
1616
})();
1717

1818
// Should raise an error, not trigger an assertion in src/node_zlib.cc
@@ -24,5 +24,5 @@ var zlib = require('zlib');
2424
}));
2525

2626
// String "test" encoded with dictionary "dict".
27-
stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5]));
27+
stream.write(Buffer([0x78, 0xBB, 0x04, 0x09, 0x01, 0xA5]));
2828
})();

test/sequential/test-tls-honorcipherorder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test1();
5757

5858
function test1() {
5959
// Client has the preference of cipher suites by default
60-
test(false, 'AES256-SHA:DES-CBC-SHA:RC4-SHA','AES256-SHA', test2);
60+
test(false, 'AES256-SHA:DES-CBC-SHA:RC4-SHA', 'AES256-SHA', test2);
6161
}
6262

6363
function test2() {

0 commit comments

Comments
 (0)