DEV: Update eslint config (#917)

* DEV: Update eslint config

* fixup

* pnpm upgrade
This commit is contained in:
David Taylor 2024-11-19 10:57:40 +00:00 committed by GitHub
parent 3ae1e4eaf0
commit 6b9c66054c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 426 additions and 434 deletions

View File

@ -1 +0,0 @@
module.exports = require("@discourse/lint-configs/eslint");

View File

@ -6,7 +6,7 @@ import { on } from "@ember/modifier";
import { action, computed } from "@ember/object";
import { LinkTo } from "@ember/routing";
import { later } from "@ember/runloop";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { eq } from "truth-helpers";
import DButton from "discourse/components/d-button";
import Avatar from "discourse/helpers/bound-avatar-template";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { concat, fn } from "@ember/helper";
import { action } from "@ember/object";
import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
import icon from "discourse-common/helpers/d-icon";
import i18n from "discourse-common/helpers/i18n";

View File

@ -7,7 +7,7 @@ import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import didUpdate from "@ember/render-modifiers/modifiers/did-update";
import { LinkTo } from "@ember/routing";
import { later } from "@ember/runloop";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import BackButton from "discourse/components/back-button";
import DButton from "discourse/components/d-button";
import Textarea from "discourse/components/d-textarea";

View File

@ -4,7 +4,7 @@ import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
import DToggleSwitch from "discourse/components/d-toggle-switch";
import concatClass from "discourse/helpers/concat-class";

View File

@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { and } from "truth-helpers";
import CookText from "discourse/components/cook-text";
import DButton from "discourse/components/d-button";

View File

@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
import { fn } from "@ember/helper";
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 categoryBadge from "discourse/helpers/category-badge";
import { ajax } from "discourse/lib/ajax";

View File

@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
import { fn } from "@ember/helper";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { LinkTo } from "@ember/routing";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DBreadcrumbsItem from "discourse/components/d-breadcrumbs-item";
import icon from "discourse-common/helpers/d-icon";
import i18n from "discourse-common/helpers/i18n";

View File

@ -1,4 +1,5 @@
import { computed, observer } from "@ember/object";
import { observer } from "@ember/object";
import { readOnly } from "@ember/object/computed";
import MultiSelectComponent from "select-kit/components/multi-select";
export default MultiSelectComponent.extend({
@ -6,9 +7,7 @@ export default MultiSelectComponent.extend({
this.selectKit.options.set("disabled", this.get("attrs.disabled.value"));
}),
content: computed("tools", function () {
return this.tools;
}),
content: readOnly("tools"),
value: "",

View File

@ -39,7 +39,7 @@ export default class DebugAiModal extends Component {
} else {
return this.formattedResponse(this.info.raw_response_payload);
}
} catch (e) {
} catch {
return this.info.raw_request_payload;
}

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import CookText from "discourse/components/cook-text";
import DButton from "discourse/components/d-button";

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
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 { isPostFromAiBot } from "../../lib/ai-bot-helper";
import DebugAiModal from "../modal/debug-ai-modal";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
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 { isPostFromAiBot } from "../../lib/ai-bot-helper";
import copyConversation from "../../lib/copy-conversation";

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import icon from "discourse-common/helpers/d-icon";
import { bind } from "discourse-common/utils/decorators";
import I18n from "discourse-i18n";

View File

@ -5,7 +5,7 @@ import { on } from "@ember/modifier";
import { action } from "@ember/object";
import { getOwner } from "@ember/owner";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DButton from "discourse/components/d-button";
import { ajax } from "discourse/lib/ajax";
import UppyUpload from "discourse/lib/uppy/uppy-upload";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import AISuggestionDropdown from "../../components/ai-suggestion-dropdown";
import { showComposerAiHelper } from "../../lib/show-ai-helper";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import AISuggestionDropdown from "../../components/ai-suggestion-dropdown";
import { showComposerAiHelper } from "../../lib/show-ai-helper";

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { computed } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import I18n from "discourse-i18n";
export default class extends Component {

View File

@ -2,7 +2,7 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { hash } from "@ember/helper";
import { next } from "@ember/runloop";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import KeyValueStore from "discourse/lib/key-value-store";
import DropdownSelectBox from "select-kit/components/dropdown-select-box";

View File

@ -4,7 +4,7 @@ import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import didUpdate from "@ember/render-modifiers/modifiers/did-update";
import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import ConditionalLoadingSpinner from "discourse/components/conditional-loading-spinner";
import DButton from "discourse/components/d-button";
import DTextarea from "discourse/components/d-textarea";

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
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 { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";

View File

@ -3,7 +3,7 @@ import { tracked } from "@glimmer/tracking";
import { on } from "@ember/modifier";
import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import DToggleSwitch from "discourse/components/d-toggle-switch";
import { SEARCH_TYPE_DEFAULT } from "discourse/controllers/full-page-search";
import { ajax } from "discourse/lib/ajax";

View File

@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
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 virtualElementFromTextRange from "discourse/lib/virtual-element-from-text-range";
import eq from "truth-helpers/helpers/eq";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import loadingSpinner from "discourse/helpers/loading-spinner";
export default class AiQuickSearchLoader extends Component {

View File

@ -1,6 +1,6 @@
import Component from "@glimmer/component";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import AssistantItem from "discourse/components/search-menu/results/assistant-item";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { isValidSearchTerm } from "discourse/lib/search";
import i18n from "discourse-common/helpers/i18n";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import AiSplitTopicSuggester from "../../components/ai-split-topic-suggester";
import { showPostAIHelper } from "../../lib/show-ai-helper";

View File

@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import AiSplitTopicSuggester from "../../components/ai-split-topic-suggester";
import { showPostAIHelper } from "../../lib/show-ai-helper";

View File

@ -1,5 +1,5 @@
import { tracked } from "@glimmer/tracking";
import Service, { inject as service } from "@ember/service";
import Service, { service } from "@ember/service";
import { IMAGE_MARKDOWN_REGEX } from "discourse/lib/uploads";
export default class ImageCaptionPopup extends Service {

3
eslint.config.mjs Normal file
View File

@ -0,0 +1,3 @@
import DiscourseRecommended from "@discourse/lint-configs/eslint";
export default [...DiscourseRecommended];

View File

@ -1,11 +1,10 @@
{
"private": true,
"devDependencies": {
"@discourse/lint-configs": "1.3.10",
"@discourse/lint-configs": "2.0.1",
"ember-template-lint": "6.0.0",
"eslint": "8.57.1",
"prettier": "2.8.8",
"@babel/plugin-proposal-decorators": "^7.25.7"
"eslint": "9.14.0",
"prettier": "2.8.8"
},
"engines": {
"node": ">= 18",

File diff suppressed because it is too large Load Diff