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: https://github.com/eslint/eslint/issues/2408 PR-URL: https://github.com/nodejs/io.js/pull/2072 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-by: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alex Kocharin <alex@kocharin.ru>
This commit is contained in:
parent
d91e10b3bd
commit
e3f9335c40
@ -43,8 +43,7 @@ rules:
|
|||||||
## 2 space indentation
|
## 2 space indentation
|
||||||
indent: [2, 2]
|
indent: [2, 2]
|
||||||
## add space after comma
|
## add space after comma
|
||||||
## set to 'warn' because of https://github.com/eslint/eslint/issues/2408
|
comma-spacing: 2
|
||||||
comma-spacing: 1
|
|
||||||
## put semi-colon
|
## put semi-colon
|
||||||
semi: 2
|
semi: 2
|
||||||
## require spaces operator like var sum = 1 + 1;
|
## require spaces operator like var sum = 1 + 1;
|
||||||
|
@ -8,7 +8,7 @@ var assert = require('assert');
|
|||||||
var dgram = require('dgram');
|
var dgram = require('dgram');
|
||||||
|
|
||||||
var socket = dgram.createSocket('udp4');
|
var socket = dgram.createSocket('udp4');
|
||||||
var buf = Buffer([1,2,3,4]);
|
var buf = Buffer([1, 2, 3, 4]);
|
||||||
|
|
||||||
function ok() {}
|
function ok() {}
|
||||||
socket.send(buf, 0, 0, common.PORT, '127.0.0.1', ok); // useful? no
|
socket.send(buf, 0, 0, common.PORT, '127.0.0.1', ok); // useful? no
|
||||||
|
@ -4,7 +4,7 @@ var http = require('http');
|
|||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var common = require('../common');
|
var common = require('../common');
|
||||||
|
|
||||||
var objects = { foo: 'bar', baz: {}, num: 42, arr: [1,2,3] };
|
var objects = { foo: 'bar', baz: {}, num: 42, arr: [1, 2, 3] };
|
||||||
objects.baz.asdf = objects;
|
objects.baz.asdf = objects;
|
||||||
|
|
||||||
var serverCaught = 0;
|
var serverCaught = 0;
|
||||||
|
@ -36,7 +36,7 @@ common.refreshTmpDir();
|
|||||||
|
|
||||||
unlink(pathname);
|
unlink(pathname);
|
||||||
|
|
||||||
fs.mkdir(pathname, 511 /*=0777*/, function(err) {
|
fs.mkdir(pathname, 0o777, function(err) {
|
||||||
assert.equal(err, null);
|
assert.equal(err, null);
|
||||||
assert.equal(common.fileExists(pathname), true);
|
assert.equal(common.fileExists(pathname), true);
|
||||||
ncalls++;
|
ncalls++;
|
||||||
|
@ -38,9 +38,9 @@ srv.listen(common.PORT, function() {
|
|||||||
['www-authenticate', 'foo'],
|
['www-authenticate', 'foo'],
|
||||||
['WWW-Authenticate', 'bar'],
|
['WWW-Authenticate', 'bar'],
|
||||||
['WWW-AUTHENTICATE', 'baz'],
|
['WWW-AUTHENTICATE', 'baz'],
|
||||||
['proxy-authenticate','foo'],
|
['proxy-authenticate', 'foo'],
|
||||||
['Proxy-Authenticate','bar'],
|
['Proxy-Authenticate', 'bar'],
|
||||||
['PROXY-AUTHENTICATE','baz'],
|
['PROXY-AUTHENTICATE', 'baz'],
|
||||||
['x-foo', 'bingo'],
|
['x-foo', 'bingo'],
|
||||||
['x-bar', 'banjo'],
|
['x-bar', 'banjo'],
|
||||||
['x-bar', 'bango'],
|
['x-bar', 'bango'],
|
||||||
|
@ -75,7 +75,7 @@ assert.equal('{ readonly: [Getter] }',
|
|||||||
common.inspect({get readonly() {}}));
|
common.inspect({get readonly() {}}));
|
||||||
|
|
||||||
assert.equal('{ readwrite: [Getter/Setter] }',
|
assert.equal('{ readwrite: [Getter/Setter] }',
|
||||||
common.inspect({get readwrite() {},set readwrite(val) {}}));
|
common.inspect({get readwrite() {}, set readwrite(val) {}}));
|
||||||
|
|
||||||
assert.equal('{ writeonly: [Setter] }',
|
assert.equal('{ writeonly: [Setter] }',
|
||||||
common.inspect({set writeonly(val) {}}));
|
common.inspect({set writeonly(val) {}}));
|
||||||
|
@ -47,20 +47,20 @@ var clientsOptions = [{
|
|||||||
crl: serverOptions.crl,
|
crl: serverOptions.crl,
|
||||||
NPNProtocols: ['a', 'b', 'c'],
|
NPNProtocols: ['a', 'b', 'c'],
|
||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
},{
|
}, {
|
||||||
port: serverPort,
|
port: serverPort,
|
||||||
key: serverOptions.key,
|
key: serverOptions.key,
|
||||||
cert: serverOptions.cert,
|
cert: serverOptions.cert,
|
||||||
crl: serverOptions.crl,
|
crl: serverOptions.crl,
|
||||||
NPNProtocols: ['c', 'b', 'e'],
|
NPNProtocols: ['c', 'b', 'e'],
|
||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
},{
|
}, {
|
||||||
port: serverPort,
|
port: serverPort,
|
||||||
key: serverOptions.key,
|
key: serverOptions.key,
|
||||||
cert: serverOptions.cert,
|
cert: serverOptions.cert,
|
||||||
crl: serverOptions.crl,
|
crl: serverOptions.crl,
|
||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
},{
|
}, {
|
||||||
port: serverPort,
|
port: serverPort,
|
||||||
key: serverOptions.key,
|
key: serverOptions.key,
|
||||||
cert: serverOptions.cert,
|
cert: serverOptions.cert,
|
||||||
|
@ -11,8 +11,8 @@ if (!common.hasCrypto) {
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
doTest({ tickets: false } , function() {
|
doTest({ tickets: false }, function() {
|
||||||
doTest({ tickets: true } , function() {
|
doTest({ tickets: true }, function() {
|
||||||
console.error('all done');
|
console.error('all done');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -21,7 +21,7 @@ var tests = [
|
|||||||
{input: function() {}, output: '[Function]'},
|
{input: function() {}, output: '[Function]'},
|
||||||
{input: parseInt('not a number', 10), output: 'NaN'},
|
{input: parseInt('not a number', 10), output: 'NaN'},
|
||||||
{input: {answer: 42}, output: '{ answer: 42 }'},
|
{input: {answer: 42}, output: '{ answer: 42 }'},
|
||||||
{input: [1,2,3], output: '[ 1, 2, 3 ]'}
|
{input: [1, 2, 3], output: '[ 1, 2, 3 ]'}
|
||||||
];
|
];
|
||||||
|
|
||||||
// test util.log()
|
// test util.log()
|
||||||
|
@ -12,7 +12,7 @@ var zlib = require('zlib');
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// String "test" encoded with dictionary "dict".
|
// String "test" encoded with dictionary "dict".
|
||||||
stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5]));
|
stream.write(Buffer([0x78, 0xBB, 0x04, 0x09, 0x01, 0xA5]));
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Should raise an error, not trigger an assertion in src/node_zlib.cc
|
// Should raise an error, not trigger an assertion in src/node_zlib.cc
|
||||||
@ -24,5 +24,5 @@ var zlib = require('zlib');
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// String "test" encoded with dictionary "dict".
|
// String "test" encoded with dictionary "dict".
|
||||||
stream.write(Buffer([0x78,0xBB,0x04,0x09,0x01,0xA5]));
|
stream.write(Buffer([0x78, 0xBB, 0x04, 0x09, 0x01, 0xA5]));
|
||||||
})();
|
})();
|
||||||
|
@ -57,7 +57,7 @@ test1();
|
|||||||
|
|
||||||
function test1() {
|
function test1() {
|
||||||
// Client has the preference of cipher suites by default
|
// Client has the preference of cipher suites by default
|
||||||
test(false, 'AES256-SHA:DES-CBC-SHA:RC4-SHA','AES256-SHA', test2);
|
test(false, 'AES256-SHA:DES-CBC-SHA:RC4-SHA', 'AES256-SHA', test2);
|
||||||
}
|
}
|
||||||
|
|
||||||
function test2() {
|
function test2() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user