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:
cjihrig authored and Michaël Zasso committed 2021-07-11 09:46:23 +02:00
1 parent 2bb3713b74
commit cb8c6ffbce
34 files changed
+2715 -94

No files matched your search

+2 -2
View File
@@ -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);