Skip to content

Commit 8727d7a

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
tools: disallow mixed spaces and tabs for indents
Enable eslint rule disallowing mixing tabs and spaces for indentation. Modify the one file that had been mixing tabs and spaces. PR-URL: #5135 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 89bea6a commit 8727d7a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.eslintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ rules:
6565
max-len: [2, 80, 2]
6666
## require parens for Constructor
6767
new-parens: 2
68+
## disallow mixed spaces and tabs for indentation
69+
no-mixed-spaces-and-tabs: 2
6870
## max 2 consecutive empty lines
6971
no-multiple-empty-lines: [2, {max: 2}]
7072
## no trailing spaces

test/parallel/test-crypto-certificate.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ var certificate = new crypto.Certificate();
2222
assert.equal(certificate.verifySpkac(spkacValid), true);
2323
assert.equal(certificate.verifySpkac(spkacFail), false);
2424

25-
assert.equal(stripLineEndings(certificate.exportPublicKey(spkacValid)
26-
.toString('utf8')),
27-
stripLineEndings(spkacPem.toString('utf8')));
25+
assert.equal(
26+
stripLineEndings(certificate.exportPublicKey(spkacValid).toString('utf8')),
27+
stripLineEndings(spkacPem.toString('utf8'))
28+
);
2829
assert.equal(certificate.exportPublicKey(spkacFail), '');
2930

30-
assert.equal(certificate.exportChallenge(spkacValid)
31-
.toString('utf8'),
32-
'fb9ab814-6677-42a4-a60c-f905d1a6924d');
31+
assert.equal(
32+
certificate.exportChallenge(spkacValid).toString('utf8'),
33+
'fb9ab814-6677-42a4-a60c-f905d1a6924d'
34+
);
3335
assert.equal(certificate.exportChallenge(spkacFail), '');
3436

3537
function stripLineEndings(obj) {

0 commit comments

Comments
 (0)