diff options
author | Rich Trott <rtrott@gmail.com> | 2016-05-04 22:20:27 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-05-08 22:45:20 -0700 |
commit | 4e6dc00401f6ca619c1bdb82394d2ba1674b5867 (patch) | |
tree | 567d5dc3088001a194c6e641b3f262128ddd3294 /test/parallel/test-http-remove-header-stays-removed.js | |
parent | 83aa1f7f3f5722174c2c6a667631cc9977d34a81 (diff) | |
download | node-new-4e6dc00401f6ca619c1bdb82394d2ba1674b5867.tar.gz |
tools: lint for object literal spacing
There has been occasional nits for spacing in object literals in PRs but
the project does not lint for it and it is not always handled
consistently in the existing code, even on adjacent lines of a file.
This change enables a linting rule requiring no space between the key
and the colon, and requiring at least one space (but allowing for more
so property values can be lined up if desired) between the colon and the
value. This appears to be the most common style used in the current code
base.
Example code the complies with lint rule:
myObj = { foo: 'bar' };
Examples that do not comply with the lint rule:
myObj = { foo : 'bar' };
myObj = { foo:'bar' };
PR-URL: https://github.com/nodejs/node/pull/6592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'test/parallel/test-http-remove-header-stays-removed.js')
-rw-r--r-- | test/parallel/test-http-remove-header-stays-removed.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-http-remove-header-stays-removed.js b/test/parallel/test-http-remove-header-stays-removed.js index 844814bf03..20390ffb20 100644 --- a/test/parallel/test-http-remove-header-stays-removed.js +++ b/test/parallel/test-http-remove-header-stays-removed.js @@ -30,7 +30,7 @@ process.on('exit', function() { server.listen(common.PORT, function() { http.get({ port: common.PORT }, function(res) { assert.equal(200, res.statusCode); - assert.deepStrictEqual(res.headers, { date : 'coffee o clock' }); + assert.deepStrictEqual(res.headers, { date: 'coffee o clock' }); res.setEncoding('ascii'); res.on('data', function(chunk) { |