DEV: Ember linting - disallow Ember.* variable usage (#8782)

This commit is contained in:
Mark VanLandingham
2020-02-05 10:14:42 -06:00
committed by GitHub
parent 88779d849f
commit 499b57a9ed
31 changed files with 97 additions and 49 deletions
@@ -1,6 +1,7 @@
import { popupAjaxError } from "discourse/lib/ajax-error";
import Controller from "@ember/controller";
export default Ember.Controller.extend({
export default Controller.extend({
actions: {
revokeKey(key) {
key.revoke().catch(popupAjaxError);
@@ -1,7 +1,8 @@
import discourseComputed from "discourse-common/utils/decorators";
import Controller from "@ember/controller";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Ember.Controller.extend({
export default Controller.extend({
userModes: [
{ id: "all", name: I18n.t("admin.api.all_users") },
{ id: "single", name: I18n.t("admin.api.single_user") }
@@ -1,8 +1,10 @@
import { bufferedProperty } from "discourse/mixins/buffered-content";
import Controller from "@ember/controller";
import { isEmpty } from "@ember/utils";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { empty } from "@ember/object/computed";
export default Ember.Controller.extend(bufferedProperty("model"), {
export default Controller.extend(bufferedProperty("model"), {
isNew: empty("model.id"),
actions: {
@@ -21,7 +23,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
cancel() {
const id = this.get("userField.id");
if (Ember.isEmpty(id)) {
if (isEmpty(id)) {
this.destroyAction(this.userField);
} else {
this.rollbackBuffer();
@@ -1,10 +1,10 @@
import discourseComputed, { observes } from "discourse-common/utils/decorators";
import { reads } from "@ember/object/computed";
import { inject } from "@ember/controller";
import Controller from "@ember/controller";
import Controller, { inject } from "@ember/controller";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import { propertyNotEqual } from "discourse/lib/computed";
import { run } from "@ember/runloop";
export default Controller.extend(bufferedProperty("model"), {
adminBadges: inject(),
@@ -23,7 +23,7 @@ export default Controller.extend(bufferedProperty("model"), {
// this is needed because the model doesnt have default values
// and as we are using a bufferedProperty it's not accessible
// in any other way
Ember.run.next(() => {
run.next(() => {
if (this.model) {
if (!this.model.badge_type_id) {
this.model.set(
@@ -13,6 +13,7 @@ import { popupAjaxError } from "discourse/lib/ajax-error";
import showModal from "discourse/lib/show-modal";
import ThemeSettings from "admin/models/theme-settings";
import { THEMES, COMPONENTS } from "admin/models/theme";
import EmberObject from "@ember/object";
const THEME_UPLOAD_VAR = 2;
@@ -67,7 +68,7 @@ export default Controller.extend({
@discourseComputed("model.parentThemes.[]")
relativesSelectorSettingsForComponent() {
return Ember.Object.create({
return EmberObject.create({
list_type: "compact",
type: "list",
preview: null,
@@ -85,7 +86,7 @@ export default Controller.extend({
@discourseComputed("model.parentThemes.[]")
relativesSelectorSettingsForTheme() {
return Ember.Object.create({
return EmberObject.create({
list_type: "compact",
type: "list",
preview: null,