Update ESLint packages
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I156623832abc081748ee50fed0ce93d864e54a67
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3297836
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
diff --git a/node_modules/eslint/lib/rules/class-methods-use-this.js b/node_modules/eslint/lib/rules/class-methods-use-this.js
index 034ba3a..beb742d 100644
--- a/node_modules/eslint/lib/rules/class-methods-use-this.js
+++ b/node_modules/eslint/lib/rules/class-methods-use-this.js
@@ -161,8 +161,17 @@
/*
* Class field value are implicit functions.
*/
- "PropertyDefinition:exit": popContext,
"PropertyDefinition > *.key:exit": pushContext,
+ "PropertyDefinition:exit": popContext,
+
+ /*
+ * Class static blocks are implicit functions. They aren't required to use `this`,
+ * but we have to push context so that it captures any use of `this` in the static block
+ * separately from enclosing contexts, because static blocks have their own `this` and it
+ * shouldn't count as used `this` in enclosing contexts.
+ */
+ StaticBlock: pushContext,
+ "StaticBlock:exit": popContext,
ThisExpression: markThisUsed,
Super: markThisUsed,