mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
tools: update ESLint to 7.30.0
Update ESLint to 7.30.0 PR-URL: https://github.com/nodejs/node/pull/39242 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
2bb3713b74
commit
cb8c6ffbce
34 files changed
+2715
-94
No files matched your search
+2
-2
@@ -349,7 +349,7 @@ class SourceCode extends TokenStore {
|
||||
let currentToken = this.getTokenBefore(node, { includeComments: true });
|
||||
|
||||
while (currentToken && isCommentToken(currentToken)) {
|
||||
if (node.parent && (currentToken.start < node.parent.start)) {
|
||||
if (node.parent && node.parent.type !== "Program" && (currentToken.start < node.parent.start)) {
|
||||
break;
|
||||
}
|
||||
comments.leading.push(currentToken);
|
||||
@@ -361,7 +361,7 @@ class SourceCode extends TokenStore {
|
||||
currentToken = this.getTokenAfter(node, { includeComments: true });
|
||||
|
||||
while (currentToken && isCommentToken(currentToken)) {
|
||||
if (node.parent && (currentToken.end > node.parent.end)) {
|
||||
if (node.parent && node.parent.type !== "Program" && (currentToken.end > node.parent.end)) {
|
||||
break;
|
||||
}
|
||||
comments.trailing.push(currentToken);
|
||||
|
||||
Reference in new issue
Block a user