From dd300b48b34130c922014dd4cb3c697f87bd70df Mon Sep 17 00:00:00 2001 From: Matias Date: Mon, 20 May 2024 09:18:31 -0300 Subject: [PATCH] Fix formatting issues with Prettier --- .../discourse/components/custom-modal.hbs | 18 ++++++++++++++---- .../initializers/custom-modal-button.js | 6 +++--- package.json | 2 +- yarn.lock | 5 +++++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/assets/javascripts/discourse/components/custom-modal.hbs b/assets/javascripts/discourse/components/custom-modal.hbs index 4c4c051..9c49116 100644 --- a/assets/javascripts/discourse/components/custom-modal.hbs +++ b/assets/javascripts/discourse/components/custom-modal.hbs @@ -1,12 +1,22 @@ - + <:body> -

By proceeding, you'll be redirected to a third-party application. Here, you can critically analyze your post to identify any fallacies or biases, ensuring your content is clear and impactful.

+

By proceeding, you'll be redirected to a third-party application. Here, + you can critically analyze your post to identify any fallacies or biases, + ensuring your content is clear and impactful.

Your text: {{@model.textValue}}

<:footer> - + Proceed -
+
\ No newline at end of file diff --git a/assets/javascripts/discourse/initializers/custom-modal-button.js b/assets/javascripts/discourse/initializers/custom-modal-button.js index 8e0c42b..14a02a3 100644 --- a/assets/javascripts/discourse/initializers/custom-modal-button.js +++ b/assets/javascripts/discourse/initializers/custom-modal-button.js @@ -42,7 +42,7 @@ function initializeWithApi(api) { function getTextAreaValue(api) { // Select the textarea element with the specified classes const textarea = document.querySelector( - ".ember-text-area.ember-view.d-editor-input" + ".ember-text-area.ember-view.d-editor-input", ); // Check if textarea is found @@ -50,8 +50,8 @@ function getTextAreaValue(api) { // Retrieve the value of the textarea const textValue = textarea.value; const test = encodeURIComponent(textValue); - //Replace with actual URL - //TO DO: Considerar pass the base URL as param or with .env, could be fun ! + //Replace with actual URL + //TO DO: Considerar pass the base URL as param or with .env, could be fun ! const encodedTextValue = `https://www.google.com/search?q=${test}`; // Open the modal diff --git a/package.json b/package.json index a26dc64..3a6345c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ "@discourse/lint-configs": "^1.3.5", "ember-template-lint": "^5.13.0", "eslint": "^8.56.0", - "prettier": "^2.8.8" + "prettier": "^3.2.5" } } diff --git a/yarn.lock b/yarn.lock index bbd7b40..0495ef0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2844,6 +2844,11 @@ prettier@^2.8.3, prettier@^2.8.8: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" + integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== + promise-map-series@^0.2.1: version "0.2.3" resolved "https://registry.yarnpkg.com/promise-map-series/-/promise-map-series-0.2.3.tgz#c2d377afc93253f6bd03dbb77755eb88ab20a847"