From 9e5664331d45bdbe4eec267ca68eb2789acf7cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 31 Oct 2024 18:20:24 +0100 Subject: [PATCH] LINT: make eslint & prettier happy --- .../initializers/discourse-perspective.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/initializers/discourse-perspective.js b/assets/javascripts/initializers/discourse-perspective.js index 9bbe2e4..bab8f4f 100644 --- a/assets/javascripts/initializers/discourse-perspective.js +++ b/assets/javascripts/initializers/discourse-perspective.js @@ -30,16 +30,19 @@ function initialize(api) { const result = this._super(force); const perspectiveEnabled = this.siteSettings.perspective_enabled; - const perspectiveNotifyUser = this.siteSettings.perspective_notify_posting_min_toxicity_enable; + const perspectiveNotifyUser = + this.siteSettings.perspective_notify_posting_min_toxicity_enable; if (perspectiveEnabled && perspectiveNotifyUser) { const isPM = this.get("topic.isPrivateMessage"); const checkPM = this.siteSettings.perspective_check_private_message; - const isSecureCategory = this.get("model.category.read_restricted"); - const checkSecureCategories = this.siteSettings.perspective_check_secured_categories; + const isSecureCategory = this.get("model.category.read_restricted"); + const checkSecureCategories = + this.siteSettings.perspective_check_secured_categories; - const check = !isPM || checkPM || !isSecureCategory || checkSecureCategories; + const check = + !isPM || checkPM || !isSecureCategory || checkSecureCategories; if (check) { this.set("disableSubmit", true); @@ -51,7 +54,11 @@ function initialize(api) { }, perspectiveCheckToxicity(composer, force) { - const concat = ["title", "raw", "reply"].map((item) => composer.get(item)).filter(Boolean).join(" ").trim(); + const concat = ["title", "raw", "reply"] + .map((item) => composer.get(item)) + .filter(Boolean) + .join(" ") + .trim(); return ajax("/perspective/post_toxicity", { type: "POST",