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

Issue:
False positives with `no-array-prototype-extensions` rule
Further to #1534 there are additional false positives when this rule is run against [ember-file-upload](https://github.com/adopted-ember-addons/ember-file-upload/runs/7440106845?check_suite_focus=true).

- `.clear()` on a `Set` (probably on a Map, too)
- `RSVP.reject()`

If I have time tomorrow I'll open a PR to address.

Pull request description:
Fix false positives with `RSVP.Promise.reject()` in `no-array-prototype-extensions` rule
Fixes #1537 (some related scenarios).

Patch:
diff --git a/lib/rules/no-array-prototype-extensions.js b/lib/rules/no-array-prototype-extensions.js
index 98fb1c5f..8ca3b6c1 100644
--- a/lib/rules/no-array-prototype-extensions.js
+++ b/lib/rules/no-array-prototype-extensions.js
@@ -66,6 +66,9 @@ const KNOWN_NON_ARRAY_FUNCTION_CALLS = new Set([
 
   // RSVP.reject
   'RSVP.reject',
+  'RSVP.Promise.reject',
+  'Ember.RSVP.reject',
+  'Ember.RSVP.Promise.reject',
 
   // *storage.clear()
   'window.localStorage.clear',


Test patch:
diff --git a/tests/lib/rules/no-array-prototype-extensions.js b/tests/lib/rules/no-array-prototype-extensions.js
index c698028f..bb307d6a 100644
--- a/tests/lib/rules/no-array-prototype-extensions.js
+++ b/tests/lib/rules/no-array-prototype-extensions.js
@@ -48,17 +48,23 @@ ruleTester.run('no-array-prototype-extensions', rule, {
     'Promise.reject();',
     'Promise.reject("some reason");',
     'reject();',
+    'this.reject();',
 
     // Global non-array class (RSVP.reject)
     'RSVP.reject();',
     'RSVP.reject("some reason");',
+    'RSVP.Promise.reject();',
+    'Ember.RSVP.reject();',
+    'Ember.RSVP.Promise.reject();',
 
     // Global non-array class (*storage.clear)
     'window.localStorage.clear();',
     'window.sessionStorage.clear();',
     'localStorage.clear();',
     'sessionStorage.clear();',
+    'sessionStorage?.clear();',
     'clear();',
+    'this.clear();',
 
     // Global non-array class (location.replace)
     'window.document.location.replace(url)',