From 2900d2c87dc461f2c4b2f4cad0f919f92d82179b Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 20 Nov 2024 14:43:28 +0000 Subject: [PATCH] DEV: Update linting (#933) --- .../discourse/components/ai-artifact.gjs | 2 +- .../discourse/components/rag-uploader.gjs | 22 +++++++++--------- .../semantic-search.gjs | 1 + .../ai-post-helper-trigger.gjs | 10 ++++---- .../ai-summary-box.gjs | 2 +- .../initializers/ai-bot-replies.js | 2 +- .../initializers/ai-image-caption.js | 2 +- package.json | 2 +- pnpm-lock.yaml | 23 +++++++++++++++---- test/javascripts/unit/lib/ai-streamer-test.js | 1 + 10 files changed, 41 insertions(+), 26 deletions(-) diff --git a/assets/javascripts/discourse/components/ai-artifact.gjs b/assets/javascripts/discourse/components/ai-artifact.gjs index 291e6cd2..6fcc692f 100644 --- a/assets/javascripts/discourse/components/ai-artifact.gjs +++ b/assets/javascripts/discourse/components/ai-artifact.gjs @@ -2,7 +2,7 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { on } from "@ember/modifier"; import { action } from "@ember/object"; -import { inject as service } from "@ember/service"; +import { service } from "@ember/service"; import DButton from "discourse/components/d-button"; import htmlClass from "discourse/helpers/html-class"; import getURL from "discourse-common/lib/get-url"; diff --git a/assets/javascripts/discourse/components/rag-uploader.gjs b/assets/javascripts/discourse/components/rag-uploader.gjs index 27c2a5c6..ec0285fd 100644 --- a/assets/javascripts/discourse/components/rag-uploader.gjs +++ b/assets/javascripts/discourse/components/rag-uploader.gjs @@ -37,6 +37,15 @@ export default class RagUploader extends Component { }, }); + willDestroy() { + super.willDestroy(...arguments); + this.appEvents.off( + `upload-mixin:${this.uppyUpload.config}:all-uploads-complete`, + this, + "_updateTargetWithUploads" + ); + } + didReceiveAttrs() { super.didReceiveAttrs(...arguments); @@ -64,15 +73,6 @@ export default class RagUploader extends Component { ); } - willDestroy() { - super.willDestroy(...arguments); - this.appEvents.off( - `upload-mixin:${this.uppyUpload.config}:all-uploads-complete`, - this, - "_updateTargetWithUploads" - ); - } - _updateTargetWithUploads() { this.updateUploads(this.ragUploads); } @@ -152,7 +152,7 @@ export default class RagUploader extends Component { @icon="times" @title="discourse_ai.rag.uploads.remove" @action={{fn this.removeUpload upload}} - @class="btn-flat" + class="btn-flat" /> @@ -173,7 +173,7 @@ export default class RagUploader extends Component { @icon="times" @title="discourse_ai.rag.uploads.remove" @action={{fn this.cancelUploading upload}} - @class="btn-flat" + class="btn-flat" /> diff --git a/assets/javascripts/discourse/connectors/full-page-search-below-search-header/semantic-search.gjs b/assets/javascripts/discourse/connectors/full-page-search-below-search-header/semantic-search.gjs index 94513499..bb1da3f8 100644 --- a/assets/javascripts/discourse/connectors/full-page-search-below-search-header/semantic-search.gjs +++ b/assets/javascripts/discourse/connectors/full-page-search-below-search-header/semantic-search.gjs @@ -168,6 +168,7 @@ export default class SemanticSearch extends Component { this.#resetAndSearchOnEvent(); } } +