Do not accept declare on previous line (#2618)
This commit is contained in:
1 parent
dbe0ca6c26
commit
ec85cf0f0a
3 files changed
+23
-1
No files matched your search
+3
-1
@@ -4676,7 +4676,9 @@ function isNodeStartingWithDeclare(node, options) {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
options.originalText.slice(0, util.locStart(node)).match(/declare\s*$/) ||
|
||||
options.originalText
|
||||
.slice(0, util.locStart(node))
|
||||
.match(/declare[ \t]*$/) ||
|
||||
options.originalText
|
||||
.slice(node.range[0], node.range[1])
|
||||
.startsWith("declare ")
|
||||
|
||||
Reference in new issue
Block a user