tools: lint for spacing around unary operators
authorRich Trott <rtrott@gmail.com>
Wed, 3 Feb 2016 20:27:40 +0000 (12:27 -0800)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
commit2f7b6060655c0c3efc40bed6a2bbae1e102f6d01
treecc6182086e71b12bc2c0f68a73d90cebc98ea32a
parent4b09dc5cac3b02a33447c3cdbe94aaddb6f2fd7c
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>
16 files changed:
.eslintrc
lib/timers.js
test/gc/test-http-client-connaborted.js
test/gc/test-http-client-onerror.js
test/gc/test-http-client-timeout.js
test/gc/test-http-client.js
test/gc/test-net-timeout.js
test/parallel/test-child-process-exec-buffer.js
test/parallel/test-fs-read-stream-inherit.js
test/parallel/test-fs-read-stream.js
test/parallel/test-http-byteswritten.js
test/parallel/test-http-date-header.js
test/parallel/test-http-set-trailers.js
test/parallel/test-https-byteswritten.js
test/parallel/test-vm-debug-context.js
test/sequential/test-cluster-listening-port.js