Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit b9e72cb

Browse files
committed
requireSpaceBetweenArguments: loosen rule restriction
Fixes #1025
1 parent 0feb327 commit b9e72cb

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/rules/require-space-between-arguments.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ module.exports.prototype = {
5252
if (punctuatorToken.value === ',') {
5353
errors.assert.whitespaceBetween({
5454
token: punctuatorToken,
55-
nextToken: file.getNextToken(punctuatorToken),
56-
spaces: 1
55+
nextToken: file.getNextToken(punctuatorToken)
5756
});
5857
}
5958
});

test/rules/require-space-between-arguments.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ describe('rules/require-space-between-arguments', function() {
1919
});
2020

2121
it('should not report any errors for a(b, c)', function() {
22-
assert.strictEqual(checker.checkString('a(b, c);').getErrorCount(), 0);
22+
assert(checker.checkString('a(b, c);').isEmpty());
23+
});
24+
25+
it('should not report any errors for a(b, c)', function() {
26+
assert(checker.checkString('a(b, c);').isEmpty());
2327
});
2428

2529
it('should not report any errors for a(b)', function() {
26-
assert.strictEqual(checker.checkString('a(b);').getErrorCount(), 0);
30+
assert(checker.checkString('a(b);').isEmpty());
2731
});
2832

2933
it('should report for a(foo(),b)', function() {
@@ -35,6 +39,6 @@ describe('rules/require-space-between-arguments', function() {
3539
});
3640

3741
it('should not report for a(foo(1, 2), b)', function() {
38-
assert.strictEqual(checker.checkString('a(foo(1, 2), b);').getErrorCount(), 0);
42+
assert(checker.checkString('a(foo(1, 2), b);').isEmpty());
3943
});
4044
});

0 commit comments

Comments
 (0)