tools: disallow mixed spaces and tabs for indents
authorRich Trott <rtrott@gmail.com>
Mon, 8 Feb 2016 18:41:15 +0000 (10:41 -0800)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.

PR-URL: https://github.com/nodejs/node/pull/5135
Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
.eslintrc
test/parallel/test-crypto-certificate.js

index 24db5df..a03bb13 100644 (file)
--- a/.eslintrc
+++ b/.eslintrc
@@ -65,6 +65,8 @@ rules:
   max-len: [2, 80, 2]
   ## require parens for Constructor
   new-parens: 2
+  ## disallow mixed spaces and tabs for indentation
+  no-mixed-spaces-and-tabs: 2
   ## max 2 consecutive empty lines
   no-multiple-empty-lines: [2, {max: 2}]
   ## no trailing spaces
index 9814b39..9948303 100644 (file)
@@ -22,14 +22,16 @@ var certificate = new crypto.Certificate();
 assert.equal(certificate.verifySpkac(spkacValid), true);
 assert.equal(certificate.verifySpkac(spkacFail), false);
 
-assert.equal(stripLineEndings(certificate.exportPublicKey(spkacValid)
-                                                         .toString('utf8')),
-                        stripLineEndings(spkacPem.toString('utf8')));
+assert.equal(
+  stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')),
+  stripLineEndings(spkacPem.toString('utf8'))
+);
 assert.equal(certificate.exportPublicKey(spkacFail), '');
 
-assert.equal(certificate.exportChallenge(spkacValid)
-                        .toString('utf8'),
-                        'fb9ab814-6677-42a4-a60c-f905d1a6924d');
+assert.equal(
+  certificate.exportChallenge(spkacValid).toString('utf8'),
+  'fb9ab814-6677-42a4-a60c-f905d1a6924d'
+);
 assert.equal(certificate.exportChallenge(spkacFail), '');
 
 function stripLineEndings(obj) {