DEV: Bump eslint-config-discourse and correct violations

This commit is contained in:
David Taylor 2022-01-26 14:13:05 +00:00
parent 2881aa771f
commit 2a17f49f66
8 changed files with 474 additions and 432 deletions

View File

@ -1,8 +1,6 @@
import I18n from "I18n";
import { default as computed } from "discourse-common/utils/decorators";
// import Category from 'discourse/models/category';
const Category = Discourse.Category;
import Category from "discourse/models/category";
const layoutMap = {
int: "int",

View File

@ -2,6 +2,7 @@ import Handlebars from "handlebars";
import { categoryLinkHTML } from "discourse/helpers/category-link";
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
import { convertIconClass, iconHTML } from "discourse-common/lib/icon-library";
import getURL from "discourse-common/lib/get-url";
function icon_or_image_replacement(str, ctx) {
str = Ember.get(ctx.contexts[0], str);
@ -68,7 +69,7 @@ const QueryRowContentComponent = Ember.Component.extend({
const ctx = {
value,
id,
baseuri: Discourse.BaseUri === "/" ? "" : Discourse.BaseUri,
baseuri: getURL(""),
};
const params = {};

View File

@ -1,4 +1,5 @@
import { default as computed, on } from "discourse-common/utils/decorators";
import getURL from "discourse-common/lib/get-url";
export default Ember.Component.extend({
classNames: ["share-report"],
@ -9,7 +10,7 @@ export default Ember.Component.extend({
@computed("group", "query")
link() {
return Discourse.BaseUrl + "/g/" + this.group + "/reports/" + this.query.id;
return getURL(`/g/${this.group}/reports/${this.query.id}`);
},
_mouseDownHandler(event) {

View File

@ -8,6 +8,7 @@ import {
} from "discourse-common/utils/decorators";
import I18n from "I18n";
import { Promise } from "rsvp";
import bootbox from "bootbox";
const NoQuery = Query.create({ name: "No queries", fake: true, group_ids: [] });

View File

@ -6,6 +6,6 @@
"license": "MIT",
"devDependencies": {
"@arkweid/lefthook": "^0.7.2",
"eslint-config-discourse": "^1.1.8"
"eslint-config-discourse": "^2.0.0"
}
}

View File

@ -7,6 +7,7 @@ import {
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
import I18n from "I18n";
import { test } from "qunit";
import { visit } from "@ember/test-helpers";
acceptance("Data Explorer Plugin | List Queries", function (needs) {
needs.user();

View File

@ -4,7 +4,7 @@ import {
query,
queryAll,
} from "discourse/tests/helpers/qunit-helpers";
import { click, fillIn, visit } from "@ember/test-helpers";
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
import I18n from "I18n";
import { test } from "qunit";

890
yarn.lock

File diff suppressed because it is too large Load Diff