disabling javascriptlint's 'test for equality mistyped as assignment', because it's not relevant to coffeescript.

This commit is contained in:
Jeremy Ashkenas 2010-08-14 16:05:14 -04:00
parent 6555d86328
commit 1d6eca76f8
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
+no_return_value # function {0} does not always return a value
+duplicate_formal # duplicate formal argument {0}
+equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
-equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
+var_hides_arg # variable {0} hides argument
+redeclared_var # redeclaration of {0} {1}
+anon_no_return_value # anonymous function does not always return a value

View File

@ -390,7 +390,7 @@
};
Lexer.prototype.sanitizeHeredoc = function(doc, options) {
var _d, attempt, indent, match;
while ((match = HEREDOC_INDENT.exec(doc))) {
while (match = HEREDOC_INDENT.exec(doc)) {
attempt = (typeof (_d = match[2]) !== "undefined" && _d !== null) ? match[2] : match[3];
if (!indent || attempt.length < indent.length) {
indent = attempt;

View File

@ -320,7 +320,7 @@ exports.Lexer = class Lexer
# Sanitize a heredoc or herecomment by escaping internal double quotes and
# erasing all external indentation on the left-hand side.
sanitizeHeredoc: (doc, options) ->
while (match = HEREDOC_INDENT.exec(doc))
while match = HEREDOC_INDENT.exec(doc)
attempt = if match[2]? then match[2] else match[3]
indent = attempt if not indent or attempt.length < indent.length
doc = doc.replace(new RegExp("^" +indent, 'gm'), '')