aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/verify/lines.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tslint/lib/verify/lines.js')
-rw-r--r--node_modules/tslint/lib/verify/lines.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/node_modules/tslint/lib/verify/lines.js b/node_modules/tslint/lib/verify/lines.js
index 3b15c0875..9fb0f5ef2 100644
--- a/node_modules/tslint/lib/verify/lines.js
+++ b/node_modules/tslint/lib/verify/lines.js
@@ -86,12 +86,12 @@ exports.ZERO_LENGTH_ERROR = "~nil";
*/
function parseLine(text) {
var multilineErrorMatch = text.match(multilineErrorRegex);
- if (multilineErrorMatch != null) {
+ if (multilineErrorMatch !== null) {
var startErrorCol = text.indexOf("~");
return new MultilineErrorLine(startErrorCol);
}
var endErrorMatch = text.match(endErrorRegex);
- if (endErrorMatch != null) {
+ if (endErrorMatch !== null) {
var squiggles = endErrorMatch[1], message = endErrorMatch[2];
var startErrorCol = text.indexOf("~");
var zeroLengthError = (squiggles === exports.ZERO_LENGTH_ERROR);
@@ -99,7 +99,7 @@ function parseLine(text) {
return new EndErrorLine(startErrorCol, endErrorCol, message);
}
var messageSubstitutionMatch = text.match(messageSubstitutionRegex);
- if (messageSubstitutionMatch != null) {
+ if (messageSubstitutionMatch !== null) {
var key = messageSubstitutionMatch[1], message = messageSubstitutionMatch[2];
return new MessageSubstitutionLine(key, message);
}
@@ -117,7 +117,7 @@ exports.parseLine = parseLine;
*/
function printLine(line, code) {
if (line instanceof ErrorLine) {
- if (code == null) {
+ if (code === undefined) {
throw new Error("Must supply argument for code parameter when line is an ErrorLine");
}
var leadingSpaces = " ".repeat(line.startCol);