Fix lint in services/patternMatcher.ts

This commit is contained in:
Nathan Shively-Sanders 2016-01-04 09:04:53 -08:00
parent ec4c6fea2d
commit b01de71d52

View file

@ -94,7 +94,7 @@ namespace ts {
// The spans in this text chunk that we think are of interest and should be matched // The spans in this text chunk that we think are of interest and should be matched
// independently. For example, if the chunk is for "UIElement" the the spans of interest // independently. For example, if the chunk is for "UIElement" the the spans of interest
// correspond to "U", "I" and "Element". If "UIElement" isn't found as an exaxt, prefix. // correspond to "U", "I" and "Element". If "UIElement" isn't found as an exact, prefix.
// or substring match, then the character spans will be used to attempt a camel case match. // or substring match, then the character spans will be used to attempt a camel case match.
characterSpans: TextSpan[]; characterSpans: TextSpan[];
} }
@ -168,7 +168,7 @@ namespace ts {
for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1;
i >= 0; i >= 0;
i--, j--) { i -= 1, j -= 1) {
const segment = dotSeparatedSegments[i]; const segment = dotSeparatedSegments[i];
const containerName = candidateContainers[j]; const containerName = candidateContainers[j];
@ -581,9 +581,10 @@ namespace ts {
for (let i = 0; i < pattern.length; i++) { for (let i = 0; i < pattern.length; i++) {
const ch = pattern.charCodeAt(i); const ch = pattern.charCodeAt(i);
if (isWordChar(ch)) { if (isWordChar(ch)) {
if (wordLength++ === 0) { if (wordLength === 0) {
wordStart = i; wordStart = i;
} }
wordLength++;
} }
else { else {
if (wordLength > 0) { if (wordLength > 0) {