Skip to content

Commit

Permalink
Misc: make jscs happy
Browse files Browse the repository at this point in the history
Since previous commits fixed some of the array bracket case, jscs now
finds more inconsistancies, yey! And it found some in this code-base too

Closes jscs-devgh-896
  • Loading branch information
markelog committed Jan 15, 2015
1 parent dc90e94 commit 1166c69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/token-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ exports.findOperatorByRangeStart = function(file, range, operator, backward) {
var tokens = file.getTokens();
var index = file.getTokenPosByRangeStart(range);

while (tokens[ index ]) {
if (tokens[ index ].value === operator) {
return tokens[ index ];
while (tokens[index]) {
if (tokens[index].value === operator) {
return tokens[index];
}

if (backward) {
Expand Down
2 changes: 1 addition & 1 deletion test/rules/maximum-line-length.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('rules/maximum-line-length', function() {
assert(checker.checkString('var a = /l/;\nvar b = l;\nvar a = new Regex("/l/");').getErrorCount() === 2);
});
it('should not be destructive to original data', function() {
assert(checker.checkString('var a = /regex/;')._file._lines[ 0 ].length > 1);
assert(checker.checkString('var a = /regex/;')._file._lines[0].length > 1);
});

});
Expand Down

0 comments on commit 1166c69

Please sign in to comment.