mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
disabling javascriptlint's 'test for equality mistyped as assignment', because it's not relevant to coffeescript.
This commit is contained in:
parent
6555d86328
commit
1d6eca76f8
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'), '')
|
||||
|
|
Loading…
Add table
Reference in a new issue