mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
tools: lint for spacing around unary operators
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:
i ++ // use `i++` instead
typeof(foo) // use `typeof foo` or `typeof (foo)` instead
Ref: https://github.com/nodejs/node/pull/4772#discussion_r51732299
PR-URL: https://github.com/nodejs/node/pull/5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
4b09dc5cac
commit
2f7b606065
16 files changed
+19
-17
No files matched your search
@@ -18,7 +18,7 @@ var body = 'hello world\n';
|
||||
|
||||
var httpsServer = https.createServer(options, function(req, res) {
|
||||
res.on('finish', function() {
|
||||
assert(typeof(req.connection.bytesWritten) === 'number');
|
||||
assert(typeof req.connection.bytesWritten === 'number');
|
||||
assert(req.connection.bytesWritten > 0);
|
||||
httpsServer.close();
|
||||
console.log('ok');
|
||||
|
||||
Reference in new issue
Block a user