From c03582a4a32bac0a0803ab7087a165dc275e23f6 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 8 Feb 2016 10:41:15 -0800 Subject: [PATCH] tools: disallow mixed spaces and tabs for indents MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Roman Reiss --- .eslintrc | 2 ++ test/parallel/test-crypto-certificate.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.eslintrc b/.eslintrc index 24db5dff4eed04..a03bb13ecaf773 100644 --- 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 diff --git a/test/parallel/test-crypto-certificate.js b/test/parallel/test-crypto-certificate.js index 9814b395552e9f..9948303f32315e 100644 --- a/test/parallel/test-crypto-certificate.js +++ b/test/parallel/test-crypto-certificate.js @@ -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) {