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

Commit 85b2f28

Browse files
committed
fixup linting issues
1 parent f3e70db commit 85b2f28

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/rules/require-padding-newlines-after-blocks.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ module.exports.prototype = {
169169
this.exceptions.SingleLine = true;
170170
} else {
171171
assert(false, optionName + ' option requires "allExcept" to only have ' +
172-
'one of "inCallExpressions", "inNewExpressions", "inArrayExpressions", "inProperties" or "singleLine"');
172+
'one of "inCallExpressions", "inNewExpressions",' +
173+
'"inArrayExpressions", "inProperties" or "singleLine"');
173174
}
174175
}, this);
175176
} else {
@@ -209,7 +210,7 @@ module.exports.prototype = {
209210
var tokens = {
210211
next: endToken.getNextCodeToken(),
211212
token: endToken
212-
}
213+
};
213214

214215
if (isException(node, parentElement, this.exceptions)) {
215216
return;

test/specs/rules/require-padding-newlines-after-blocks.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,13 @@ describe('rules/require-padding-newlines-after-blocks', function() {
267267
});
268268

269269
it('should not report missing padding when block is a single line', function() {
270-
expect(checker.checkString('var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {continue;}\n++i;\n}')).to.have.no.errors();
270+
var str = 'var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {continue;}\n++i;\n}';
271+
expect(checker.checkString(str)).to.have.no.errors();
271272
});
272273

273-
it('should not report missing padding when block is a single line nested in another single line block', function() {
274-
expect(checker.checkString('var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {if(i === 4) {continue;}}\n++i;\n}')).to.have.no.errors();
274+
it('should not report missing padding when block is a single line that is nested', function() {
275+
var str = 'var i = 0;\nwhile (i < 100) {\nif(i % 2 === 0) {if(i === 4) {continue;}}\n++i;\n}';
276+
expect(checker.checkString(str)).to.have.no.errors();
275277
});
276278
});
277279

0 commit comments

Comments
 (0)