DEV: Correctly lint bundled plugins admin directory (#29999)
This commit is contained in:
parent
3b334f54fc
commit
a52b83333e
|
@ -47,8 +47,8 @@
|
||||||
"lint:js:fix": "eslint --fix ./app/assets/javascripts $(script/list_bundled_plugins) --no-error-on-unmatched-pattern",
|
"lint:js:fix": "eslint --fix ./app/assets/javascripts $(script/list_bundled_plugins) --no-error-on-unmatched-pattern",
|
||||||
"lint:hbs": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' $(script/list_bundled_plugins '/assets/javascripts/**/*.{gjs,hbs}') --no-error-on-unmatched-pattern",
|
"lint:hbs": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' $(script/list_bundled_plugins '/assets/javascripts/**/*.{gjs,hbs}') --no-error-on-unmatched-pattern",
|
||||||
"lint:hbs:fix": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' $(script/list_bundled_plugins '/assets/javascripts/**/*.{gjs,hbs}') --no-error-on-unmatched-pattern --fix",
|
"lint:hbs:fix": "ember-template-lint 'app/assets/javascripts/**/*.{gjs,hbs}' $(script/list_bundled_plugins '/assets/javascripts/**/*.{gjs,hbs}') --no-error-on-unmatched-pattern --fix",
|
||||||
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/assets/javascripts/**/*.{js,gjs,hbs}')",
|
"lint:prettier": "pnpm pprettier --list-different 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets}/javascripts/**/*.{js,gjs,hbs}')",
|
||||||
"lint:prettier:fix": "pnpm prettier -w 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/assets/javascripts/**/*.{js,gjs,hbs}')",
|
"lint:prettier:fix": "pnpm prettier -w 'app/assets/stylesheets/**/*.scss' 'app/assets/javascripts/**/*.{js,gjs,hbs}' $(script/list_bundled_plugins '/assets/stylesheets/**/*.scss') $(script/list_bundled_plugins '/{assets,admin/assets}/javascripts/**/*.{js,gjs,hbs}')",
|
||||||
"lttf:ignore": "lint-to-the-future ignore",
|
"lttf:ignore": "lint-to-the-future ignore",
|
||||||
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
"lttf:output": "lint-to-the-future output -o ./lint-progress/",
|
||||||
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
|
"lint-progress": "pnpm lttf:output && npx html-pages ./lint-progress --no-cache",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import I18n, { i18n } from 'discourse-i18n';
|
import I18n, { i18n } from "discourse-i18n";
|
||||||
import DaBooleanField from "./fields/da-boolean-field";
|
import DaBooleanField from "./fields/da-boolean-field";
|
||||||
import DaCategoriesField from "./fields/da-categories-field";
|
import DaCategoriesField from "./fields/da-categories-field";
|
||||||
import DaCategoryField from "./fields/da-category-field";
|
import DaCategoryField from "./fields/da-category-field";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { hash } from "@ember/helper";
|
import { hash } from "@ember/helper";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ComboBox from "select-kit/components/combo-box";
|
import ComboBox from "select-kit/components/combo-box";
|
||||||
import BaseField from "./da-base-field";
|
import BaseField from "./da-base-field";
|
||||||
import DAFieldDescription from "./da-field-description";
|
import DAFieldDescription from "./da-field-description";
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { hash } from "@ember/helper";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import DButton from "discourse/components/d-button";
|
import DButton from "discourse/components/d-button";
|
||||||
import ModalJsonSchemaEditor from "discourse/components/modal/json-schema-editor";
|
import ModalJsonSchemaEditor from "discourse/components/modal/json-schema-editor";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import BaseField from "./da-base-field";
|
import BaseField from "./da-base-field";
|
||||||
import DAFieldDescription from "./da-field-description";
|
import DAFieldDescription from "./da-field-description";
|
||||||
import DAFieldLabel from "./da-field-label";
|
import DAFieldLabel from "./da-field-label";
|
||||||
|
@ -74,9 +74,7 @@ export default class KeyValueField extends BaseField {
|
||||||
|
|
||||||
get showJsonModalLabel() {
|
get showJsonModalLabel() {
|
||||||
if (this.keyCount === 0) {
|
if (this.keyCount === 0) {
|
||||||
return i18n(
|
return i18n("discourse_automation.fields.key_value.label_without_count");
|
||||||
"discourse_automation.fields.key_value.label_without_count"
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
return i18n("discourse_automation.fields.key_value.label_with_count", {
|
return i18n("discourse_automation.fields.key_value.label_with_count", {
|
||||||
count: this.keyCount,
|
count: this.keyCount,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { on } from "@ember/modifier";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { next } from "@ember/runloop";
|
import { next } from "@ember/runloop";
|
||||||
import { TrackedObject } from "@ember-compat/tracked-built-ins";
|
import { TrackedObject } from "@ember-compat/tracked-built-ins";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ComboBox from "select-kit/components/combo-box";
|
import ComboBox from "select-kit/components/combo-box";
|
||||||
import BaseField from "./da-base-field";
|
import BaseField from "./da-base-field";
|
||||||
import DAFieldDescription from "./da-field-description";
|
import DAFieldDescription from "./da-field-description";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { service } from "@ember/service";
|
||||||
import { TrackedArray, TrackedObject } from "@ember-compat/tracked-built-ins";
|
import { TrackedArray, TrackedObject } from "@ember-compat/tracked-built-ins";
|
||||||
import DButton from "discourse/components/d-button";
|
import DButton from "discourse/components/d-button";
|
||||||
import DEditor from "discourse/components/d-editor";
|
import DEditor from "discourse/components/d-editor";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import PlaceholdersList from "../placeholders-list";
|
import PlaceholdersList from "../placeholders-list";
|
||||||
import BaseField from "./da-base-field";
|
import BaseField from "./da-base-field";
|
||||||
import DAFieldLabel from "./da-field-label";
|
import DAFieldLabel from "./da-field-label";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { fn, hash } from "@ember/helper";
|
import { fn, hash } from "@ember/helper";
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import UserChooser from "select-kit/components/user-chooser";
|
import UserChooser from "select-kit/components/user-chooser";
|
||||||
import BaseField from "./da-base-field";
|
import BaseField from "./da-base-field";
|
||||||
import DAFieldDescription from "./da-field-description";
|
import DAFieldDescription from "./da-field-description";
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { schedule } from "@ember/runloop";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { extractError } from "discourse/lib/ajax-error";
|
import { extractError } from "discourse/lib/ajax-error";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class AutomationEdit extends Controller {
|
export default class AutomationEdit extends Controller {
|
||||||
@service dialog;
|
@service dialog;
|
||||||
|
|
|
@ -3,7 +3,7 @@ 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 escape from "discourse-common/lib/escape";
|
import escape from "discourse-common/lib/escape";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class AutomationIndex extends Controller {
|
export default class AutomationIndex extends Controller {
|
||||||
@service dialog;
|
@service dialog;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import DButton from "discourse/components/d-button";
|
||||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||||
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 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title";
|
import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title";
|
||||||
|
|
||||||
export default class AdminChatIncomingWebhooksList extends Component {
|
export default class AdminChatIncomingWebhooksList extends Component {
|
||||||
|
|
|
@ -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 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
|
|
||||||
export default class ChatAdminPluginActions extends Component {
|
export default class ChatAdminPluginActions extends Component {
|
||||||
@service dialog;
|
@service dialog;
|
||||||
|
@ -20,9 +20,7 @@ export default class ChatAdminPluginActions extends Component {
|
||||||
async exportMessages() {
|
async exportMessages() {
|
||||||
try {
|
try {
|
||||||
await this.chatAdminApi.exportMessages();
|
await this.chatAdminApi.exportMessages();
|
||||||
this.dialog.alert(
|
this.dialog.alert(i18n("chat.admin.export_messages.export_has_started"));
|
||||||
i18n("chat.admin.export_messages.export_has_started")
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
popupAjaxError(error);
|
popupAjaxError(error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import Form from "discourse/components/form";
|
||||||
import replaceEmoji from "discourse/helpers/replace-emoji";
|
import replaceEmoji from "discourse/helpers/replace-emoji";
|
||||||
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 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatChannelChooser from "discourse/plugins/chat/discourse/components/chat-channel-chooser";
|
import ChatChannelChooser from "discourse/plugins/chat/discourse/components/chat-channel-chooser";
|
||||||
|
|
||||||
export default class ChatIncomingWebhookEditForm extends Component {
|
export default class ChatIncomingWebhookEditForm extends Component {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { service } from "@ember/service";
|
||||||
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 DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import { i18n } from 'discourse-i18n';
|
import { i18n } from "discourse-i18n";
|
||||||
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
import ChatChannel from "discourse/plugins/chat/discourse/models/chat-channel";
|
||||||
|
|
||||||
export default class DiscourseChatIncomingWebhooksIndex extends DiscourseRoute {
|
export default class DiscourseChatIncomingWebhooksIndex extends DiscourseRoute {
|
||||||
|
|
Loading…
Reference in New Issue