DEV: Bump eslint-config-discourse and correct violations
This commit is contained in:
parent
2881aa771f
commit
2a17f49f66
|
@ -1,8 +1,6 @@
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { default as computed } from "discourse-common/utils/decorators";
|
import { default as computed } from "discourse-common/utils/decorators";
|
||||||
// import Category from 'discourse/models/category';
|
import Category from "discourse/models/category";
|
||||||
|
|
||||||
const Category = Discourse.Category;
|
|
||||||
|
|
||||||
const layoutMap = {
|
const layoutMap = {
|
||||||
int: "int",
|
int: "int",
|
||||||
|
|
|
@ -2,6 +2,7 @@ import Handlebars from "handlebars";
|
||||||
import { categoryLinkHTML } from "discourse/helpers/category-link";
|
import { categoryLinkHTML } from "discourse/helpers/category-link";
|
||||||
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
import { autoUpdatingRelativeAge } from "discourse/lib/formatter";
|
||||||
import { convertIconClass, iconHTML } from "discourse-common/lib/icon-library";
|
import { convertIconClass, iconHTML } from "discourse-common/lib/icon-library";
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
|
||||||
function icon_or_image_replacement(str, ctx) {
|
function icon_or_image_replacement(str, ctx) {
|
||||||
str = Ember.get(ctx.contexts[0], str);
|
str = Ember.get(ctx.contexts[0], str);
|
||||||
|
@ -68,7 +69,7 @@ const QueryRowContentComponent = Ember.Component.extend({
|
||||||
const ctx = {
|
const ctx = {
|
||||||
value,
|
value,
|
||||||
id,
|
id,
|
||||||
baseuri: Discourse.BaseUri === "/" ? "" : Discourse.BaseUri,
|
baseuri: getURL(""),
|
||||||
};
|
};
|
||||||
const params = {};
|
const params = {};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { default as computed, on } from "discourse-common/utils/decorators";
|
import { default as computed, on } from "discourse-common/utils/decorators";
|
||||||
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
|
||||||
export default Ember.Component.extend({
|
export default Ember.Component.extend({
|
||||||
classNames: ["share-report"],
|
classNames: ["share-report"],
|
||||||
|
@ -9,7 +10,7 @@ export default Ember.Component.extend({
|
||||||
|
|
||||||
@computed("group", "query")
|
@computed("group", "query")
|
||||||
link() {
|
link() {
|
||||||
return Discourse.BaseUrl + "/g/" + this.group + "/reports/" + this.query.id;
|
return getURL(`/g/${this.group}/reports/${this.query.id}`);
|
||||||
},
|
},
|
||||||
|
|
||||||
_mouseDownHandler(event) {
|
_mouseDownHandler(event) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
|
import bootbox from "bootbox";
|
||||||
|
|
||||||
const NoQuery = Query.create({ name: "No queries", fake: true, group_ids: [] });
|
const NoQuery = Query.create({ name: "No queries", fake: true, group_ids: [] });
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arkweid/lefthook": "^0.7.2",
|
"@arkweid/lefthook": "^0.7.2",
|
||||||
"eslint-config-discourse": "^1.1.8"
|
"eslint-config-discourse": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {
|
||||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
import { visit } from "@ember/test-helpers";
|
||||||
|
|
||||||
acceptance("Data Explorer Plugin | List Queries", function (needs) {
|
acceptance("Data Explorer Plugin | List Queries", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
query,
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} 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 { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
|
|
Loading…
Reference in New Issue