Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools, test: enable space-in-parens ESLint rule #4753

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ rules:
eol-last: 2
## no trailing spaces
no-trailing-spaces: 2
# require space after keywords, eg 'for (..)'
## require space after keywords, eg 'for (..)'
space-after-keywords: 2
## no leading/trailing spaces in parens
space-in-parens: [2, "never"]

# ECMAScript 6
# list: http://eslint.org/docs/rules/#ecmascript-6
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-beforeexit-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var common = require('../common');
var revivals = 0;
var deaths = 0;

process.on('beforeExit', function() { deaths++; } );
process.on('beforeExit', function() { deaths++; });

process.once('beforeExit', tryImmediate);

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-hmac.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var wikipedia = [
for (var i = 0, l = wikipedia.length; i < l; i++) {
for (var hash in wikipedia[i]['hmac']) {
// FIPS does not support MD5.
if (common.hasFipsCrypto && hash == 'md5' )
if (common.hasFipsCrypto && hash == 'md5')
continue;
var result = crypto.createHmac(hash, wikipedia[i]['key'])
.update(wikipedia[i]['data'])
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http-client-timeout-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var options = {
var server = http.createServer(function(req, res) {
const m = /\/(.*)/.exec(req.url);
const reqid = parseInt(m[1], 10);
if ( reqid % 2 ) {
if (reqid % 2) {
// do not reply the request
} else {
res.writeHead(200, {'Content-Type': 'text/plain'});
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ assert.throws(
assert.doesNotThrow(function() {
process.binding('buffer');
}, function(err) {
if ( (err instanceof Error) ) {
if (err instanceof Error) {
return true;
}
}, 'unexpected error');
2 changes: 1 addition & 1 deletion test/pummel/test-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ clearTimeout(id);

setInterval(function() {
interval_count += 1;
var endtime = new Date( );
var endtime = new Date();

var diff = endtime - starttime;
assert.ok(diff > 0);
Expand Down