DEV: Fix imports (#192)

This commit is contained in:
Jarek Radosz 2022-03-06 21:33:24 +01:00 committed by GitHub
parent 6007395cfb
commit 7c50330e04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 10 deletions

View File

@ -9,6 +9,7 @@ import { ajax } from "discourse/lib/ajax";
import PostCooked from "discourse/widgets/post-cooked"; import PostCooked from "discourse/widgets/post-cooked";
import { formatUsername } from "discourse/lib/utilities"; import { formatUsername } from "discourse/lib/utilities";
import { iconHTML, iconNode } from "discourse-common/lib/icon-library"; import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
import { computed } from "@ember/object";
function clearAccepted(topic) { function clearAccepted(topic) {
const posts = topic.get("postStream.posts"); const posts = topic.get("postStream.posts");
@ -216,7 +217,7 @@ export default {
initialize() { initialize() {
Topic.reopen({ Topic.reopen({
// keeping this here cause there is complex localization // keeping this here cause there is complex localization
acceptedAnswerHtml: Ember.computed("accepted_answer", "id", function () { acceptedAnswerHtml: computed("accepted_answer", "id", function () {
const username = this.get("accepted_answer.username"); const username = this.get("accepted_answer.username");
const postNumber = this.get("accepted_answer.post_number"); const postNumber = this.get("accepted_answer.post_number");
@ -236,7 +237,7 @@ export default {
}); });
TopicStatus.reopen({ TopicStatus.reopen({
statuses: Ember.computed(function () { statuses: computed(function () {
const results = this._super(...arguments); const results = this._super(...arguments);
if (this.topic.has_accepted_answer) { if (this.topic.has_accepted_answer) {

View File

@ -1,4 +1,5 @@
import Category from "discourse/models/category"; import Category from "discourse/models/category";
import { computed } from "@ember/object";
export default { export default {
name: "extend-category-for-solved", name: "extend-category-for-solved",
@ -7,11 +8,11 @@ export default {
initialize() { initialize() {
Category.reopen({ Category.reopen({
enable_accepted_answers: Ember.computed( enable_accepted_answers: computed(
"custom_fields.enable_accepted_answers", "custom_fields.enable_accepted_answers",
{ {
get(fieldName) { get(fieldName) {
return Ember.get(this.custom_fields, fieldName) === "true"; return this.get(this.custom_fields, fieldName) === "true";
}, },
} }
), ),

View File

@ -2,6 +2,6 @@
"author": "Discourse", "author": "Discourse",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"eslint-config-discourse": "^1.1.8" "eslint-config-discourse": "^2.0.0"
} }
} }

View File

@ -1,7 +1,7 @@
import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers"; import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender"; import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
import { test } from "qunit"; import { test } from "qunit";
import { click, visit } from "@ember/test-helpers"; import { click, fillIn, visit } from "@ember/test-helpers";
acceptance("Discourse Solved Plugin", function (needs) { acceptance("Discourse Solved Plugin", function (needs) {
needs.user(); needs.user();

View File

@ -498,10 +498,10 @@ escape-string-regexp@^1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
eslint-config-discourse@^1.1.8: eslint-config-discourse@^2.0.0:
version "1.1.8" version "2.0.0"
resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-1.1.8.tgz#c297831876811ea08203aa348d1ba2a963b2ae78" resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-2.0.0.tgz#811ab2cf4e32c1f0d41bd57d9736d578fe80b741"
integrity sha512-ZSQfhliiO5Cfa7WcKoMkN4wW/1rBJpecpMJpfjiFsElfgPj4EV4Pzksi5CvFnRbJDoZh6DYYrQfO+tW062VOUA== integrity sha512-enjsLU++iibJXM64YM6Y/yUM5580wKtkti9fQdrJDFkfLJnvv8/f2j7QmNbX//MoqWfIQfY2RkHH6VTfRUg4Mw==
dependencies: dependencies:
babel-eslint "^10.1.0" babel-eslint "^10.1.0"
ember-template-lint "^2.11.0" ember-template-lint "^2.11.0"