DEV: Fix linting issues in core plugins (#14916)

DEV: Fix linting issues in core plugins (#14916)

diff --git a/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js b/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js
index f3b3a54..1f09262 100644
--- a/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js
+++ b/plugins/discourse-details/test/javascripts/acceptance/details-button-test.js
@@ -7,6 +7,7 @@ import I18n from "I18n";
 import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
 import selectKit from "discourse/tests/helpers/select-kit-helper";
 import { test } from "qunit";
+import { click, fillIn, visit } from "@ember/test-helpers";
 
 acceptance("Details Button", function (needs) {
   needs.user();
diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js
index 2fdfa3f..f1a95cf 100644
--- a/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js
+++ b/plugins/discourse-local-dates/assets/javascripts/discourse/components/discourse-local-dates-create-form.js
@@ -12,6 +12,7 @@ import loadScript from "discourse/lib/load-script";
 import { notEmpty } from "@ember/object/computed";
 import { propertyNotEqual } from "discourse/lib/computed";
 import { schedule } from "@ember/runloop";
+import { getOwner } from "discourse-common/lib/get-owner";
 
 export default Component.extend({
   timeFormat: "HH:mm:ss",
@@ -435,7 +436,7 @@ export default Component.extend({
   },
 
   _closeModal() {
-    const composer = Discourse.__container__.lookup("controller:composer");
+    const composer = getOwner(this).lookup("controller:composer");
     composer.send("closeModal");
   },
 });
diff --git a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js
index e5502fc..b45d5e4 100644
--- a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js
+++ b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-composer-test.js
@@ -1,5 +1,6 @@
 import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
 import { test } from "qunit";
+import { click, fillIn, visit } from "@ember/test-helpers";
 
 acceptance("Local Dates - composer", function (needs) {
   needs.user();
diff --git a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js
index 83782fd..a419bee 100644
--- a/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js
+++ b/plugins/discourse-local-dates/test/javascripts/lib/local-date-builder-test.js
@@ -1,7 +1,7 @@
 import I18n from "I18n";
 import LocalDateBuilder from "./local-date-builder";
 import sinon from "sinon";
-import { module, test } from "qunit";
+import QUnit, { module, test } from "qunit";
 
 const UTC = "Etc/UTC";
 const SYDNEY = "Australia/Sydney";
diff --git a/plugins/discourse-presence/test/javascripts/acceptance/discourse-presence-test.js b/plugins/discourse-presence/test/javascripts/acceptance/discourse-presence-test.js
index 32c8f48..3500f13 100644
--- a/plugins/discourse-presence/test/javascripts/acceptance/discourse-presence-test.js
+++ b/plugins/discourse-presence/test/javascripts/acceptance/discourse-presence-test.js
@@ -1,6 +1,7 @@
 import {
   acceptance,
   count,
+  exists,
   queryAll,
 } from "discourse/tests/helpers/qunit-helpers";
 import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
diff --git a/plugins/poll/assets/javascripts/controllers/poll-breakdown.js b/plugins/poll/assets/javascripts/controllers/poll-breakdown.js
index 794efa0..77d1c1e 100644
--- a/plugins/poll/assets/javascripts/controllers/poll-breakdown.js
+++ b/plugins/poll/assets/javascripts/controllers/poll-breakdown.js
@@ -8,6 +8,7 @@ import discourseComputed from "discourse-common/utils/decorators";
 import { htmlSafe } from "@ember/template";
 import loadScript from "discourse/lib/load-script";
 import { popupAjaxError } from "discourse/lib/ajax-error";
+import bootbox from "bootbox";
 
 export default Controller.extend(ModalFunctionality, {
   model: null,
diff --git a/plugins/poll/assets/javascripts/widgets/discourse-poll.js b/plugins/poll/assets/javascripts/widgets/discourse-poll.js
index 138f0b8..3b1dfa5 100644
--- a/plugins/poll/assets/javascripts/widgets/discourse-poll.js
+++ b/plugins/poll/assets/javascripts/widgets/discourse-poll.js
@@ -13,6 +13,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
 import { relativeAge } from "discourse/lib/formatter";
 import round from "discourse/lib/round";
 import showModal from "discourse/lib/show-modal";
+import bootbox from "bootbox";
 
 const FETCH_VOTERS_COUNT = 25;
 
diff --git a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js
index c901fef..750a053 100644
--- a/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js
+++ b/plugins/poll/test/javascripts/acceptance/poll-breakdown-test.js
@@ -6,7 +6,7 @@ import {
 } from "discourse/tests/helpers/qunit-helpers";
 import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
 import { test } from "qunit";
-import { visit } from "@ember/test-helpers";
+import { click, visit } from "@ember/test-helpers";
 
 acceptance("Poll breakdown", function (needs) {
   needs.user();
diff --git a/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js b/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js
index 7399ee3..7e8e011 100644
--- a/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js
+++ b/plugins/poll/test/javascripts/acceptance/poll-in-reply-history-test.js
@@ -1,7 +1,7 @@
 import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers";
 import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
 import { test } from "qunit";
-import { visit } from "@ember/test-helpers";
+import { click, visit } from "@ember/test-helpers";
 
 acceptance("Poll in a post reply history", function (needs) {
   needs.user();
diff --git a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js
index 80034ed..491aa00 100644
--- a/plugins/poll/test/javascripts/acceptance/poll-quote-test.js
+++ b/plugins/poll/test/javascripts/acceptance/poll-quote-test.js
@@ -1,7 +1,7 @@
 import { acceptance, count } from "discourse/tests/helpers/qunit-helpers";
 import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
 import { test } from "qunit";
-import { visit } from "@ember/test-helpers";
+import { click, visit } from "@ember/test-helpers";
 
 acceptance("Poll quote", function (needs) {
   needs.user();
diff --git a/plugins/poll/test/javascripts/acceptance/poll-results-test.js b/plugins/poll/test/javascripts/acceptance/poll-results-test.js
index 16fbe4f..5a7e52d 100644
--- a/plugins/poll/test/javascripts/acceptance/poll-results-test.js
+++ b/plugins/poll/test/javascripts/acceptance/poll-results-test.js
@@ -6,7 +6,7 @@ import {
 } from "discourse/tests/helpers/qunit-helpers";
 import { test } from "qunit";
 import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
-import { visit } from "@ember/test-helpers";
+import { click, visit } from "@ember/test-helpers";
 
 acceptance("Poll results", function (needs) {
   needs.user();
@@ -568,11 +568,11 @@ acceptance("Poll results", function (needs) {
     await visit("/t/-/load-more-poll-voters");
 
     assert.strictEqual(
-      find(".poll-container .results li:nth-child(1) .poll-voters li").length,
+      count(".poll-container .results li:nth-child(1) .poll-voters li"),
       1
     );
     assert.strictEqual(

[... diff too long, it was truncated ...]

GitHub sha: 906a71a607285d9842c97d8bf135e1d4aea5f28d

This commit appears in #14916 which was approved by techAPJ. It was merged by CvX.