DEV: Bump dependencies and fix linting (#247)

This commit is contained in:
David Taylor 2025-02-06 16:44:36 +00:00 committed by GitHub
parent 21a0546d7f
commit b092d2f11a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 759 additions and 603 deletions

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import I18n from "I18n"; import { i18n } from "discourse-i18n";
export default class ChannelDetails extends Component { export default class ChannelDetails extends Component {
@service dialog; @service dialog;
@ -11,7 +11,7 @@ export default class ChannelDetails extends Component {
@action @action
deleteChannel(channel) { deleteChannel(channel) {
this.dialog.deleteConfirm({ this.dialog.deleteConfirm({
message: I18n.t("chat_integration.channel_delete_confirm"), message: i18n("chat_integration.channel_delete_confirm"),
didConfirm: () => { didConfirm: () => {
return channel return channel
.destroyRecord() .destroyRecord()

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import { action } from "@ember/object"; import { action } from "@ember/object";
import I18n from "I18n"; import { i18n } from "discourse-i18n";
export default class ChannelParamRow extends Component { export default class ChannelParamRow extends Component {
get validation() { get validation() {
@ -13,14 +13,14 @@ export default class ChannelParamRow extends Component {
} else if (new RegExp(this.args.param.regex).test(value)) { } else if (new RegExp(this.args.param.regex).test(value)) {
return { return {
ok: true, ok: true,
reason: I18n.t( reason: i18n(
"chat_integration.edit_channel_modal.channel_validation.ok" "chat_integration.edit_channel_modal.channel_validation.ok"
), ),
}; };
} else { } else {
return { return {
failed: true, failed: true,
reason: I18n.t( reason: i18n(
"chat_integration.edit_channel_modal.channel_validation.fail" "chat_integration.edit_channel_modal.channel_validation.fail"
), ),
}; };

View File

@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { ajax } from "discourse/lib/ajax"; import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error"; import { popupAjaxError } from "discourse/lib/ajax-error";
import I18n from "I18n"; import { i18n } from "discourse-i18n";
export default class TestIntegration extends Component { export default class TestIntegration extends Component {
@tracked loading = false; @tracked loading = false;
@ -24,7 +24,7 @@ export default class TestIntegration extends Component {
}); });
this.loading = false; this.loading = false;
this.flash = I18n.t("chat_integration.test_modal.success"); this.flash = i18n("chat_integration.test_modal.success");
} catch (e) { } catch (e) {
popupAjaxError(e); popupAjaxError(e);
} }

View File

@ -1,7 +1,7 @@
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import RestModel from "discourse/models/rest"; import RestModel from "discourse/models/rest";
import I18n from "I18n"; import { i18n } from "discourse-i18n";
export default class Rule extends RestModel { export default class Rule extends RestModel {
@tracked type = "normal"; @tracked type = "normal";
@ -12,14 +12,14 @@ export default class Rule extends RestModel {
@tracked error_key = null; @tracked error_key = null;
available_types = [ available_types = [
{ id: "normal", name: I18n.t("chat_integration.type.normal") }, { id: "normal", name: i18n("chat_integration.type.normal") },
{ {
id: "group_message", id: "group_message",
name: I18n.t("chat_integration.type.group_message"), name: i18n("chat_integration.type.group_message"),
}, },
{ {
id: "group_mention", id: "group_mention",
name: I18n.t("chat_integration.type.group_mention"), name: i18n("chat_integration.type.group_mention"),
}, },
]; ];
@ -32,7 +32,7 @@ export default class Rule extends RestModel {
if (provider === "slack") { if (provider === "slack") {
available.push({ available.push({
id: "thread", id: "thread",
name: I18n.t("chat_integration.filter.thread"), name: i18n("chat_integration.filter.thread"),
icon: "chevron-right", icon: "chevron-right",
}); });
} }
@ -40,17 +40,17 @@ export default class Rule extends RestModel {
available.push( available.push(
{ {
id: "watch", id: "watch",
name: I18n.t("chat_integration.filter.watch"), name: i18n("chat_integration.filter.watch"),
icon: "circle-exclamation", icon: "circle-exclamation",
}, },
{ {
id: "follow", id: "follow",
name: I18n.t("chat_integration.filter.follow"), name: i18n("chat_integration.filter.follow"),
icon: "circle", icon: "circle",
}, },
{ {
id: "mute", id: "mute",
name: I18n.t("chat_integration.filter.mute"), name: i18n("chat_integration.filter.mute"),
icon: "circle-xmark", icon: "circle-xmark",
} }
); );
@ -69,7 +69,7 @@ export default class Rule extends RestModel {
} }
get filterName() { get filterName() {
return I18n.t(`chat_integration.filter.${this.filter}`); return i18n(`chat_integration.filter.${this.filter}`);
} }
updateProperties() { updateProperties() {

View File

@ -1,15 +1,16 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "2.2.2", "@discourse/lint-configs": "2.4.0",
"ember-template-lint": "6.0.0", "ember-template-lint": "6.1.0",
"eslint": "9.15.0", "eslint": "9.19.0",
"prettier": "2.8.8" "prettier": "2.8.8"
}, },
"engines": { "engines": {
"node": ">= 18", "node": ">= 22",
"npm": "please-use-pnpm", "npm": "please-use-pnpm",
"yarn": "please-use-pnpm", "yarn": "please-use-pnpm",
"pnpm": ">= 9" "pnpm": "9.x"
} },
"packageManager": "pnpm@9.15.5"
} }

File diff suppressed because it is too large Load Diff