Repository: ember-cli/eslint-plugin-ember (js)

Issue:
Add special case for super in ember/no-array-prototype-extensions
Can we safely ignore when obj is called super?

![Screenshot 2022-08-04 at 16 36 52](https://user-images.githubusercontent.com/50884/182888200-c9f48a5a-bb9c-4df0-b40a-2cad6e297eba.png)

Thanks in advance!

Pull request description:
Ignore `super` in `no-array-prototype-extensions` rule
Fixes #1553.

Patch:
diff --git a/lib/rules/no-array-prototype-extensions.js b/lib/rules/no-array-prototype-extensions.js
index 04bd018e..d8427938 100644
--- a/lib/rules/no-array-prototype-extensions.js
+++ b/lib/rules/no-array-prototype-extensions.js
@@ -186,8 +186,8 @@ module.exports = {
           return;
         }
 
-        // Skip case: this.filterBy();
-        if (node.callee.object.type === 'ThisExpression') {
+        // Skip case: this.filterBy(); super.filterBy();
+        if (['ThisExpression', 'Super'].includes(node.callee.object.type)) {
           return;
         }
 


Test patch:
diff --git a/tests/lib/rules/no-array-prototype-extensions.js b/tests/lib/rules/no-array-prototype-extensions.js
index b014ced6..dcf74a6a 100644
--- a/tests/lib/rules/no-array-prototype-extensions.js
+++ b/tests/lib/rules/no-array-prototype-extensions.js
@@ -142,6 +142,9 @@ ruleTester.run('no-array-prototype-extensions', rule, {
     'set_foo.clear();',
     'map_foo.clear();',
 
+    // super
+    'super.clear();',
+
     // Class property definition with non-array class.
     `class MyClass {
       foo = new Set();