DEV: Tidy up imports. (#11364)

Only allow one import definition per file and add a new eslint rule to enforce it.
This commit is contained in:
Roman Rizzi
2020-11-27 11:30:16 -03:00
committed by GitHub
parent 2e5e4dbf19
commit 1c2358ba16
178 changed files with 394 additions and 408 deletions

View File

@@ -6,8 +6,7 @@ import Component from "@ember/component";
import UserField from "admin/models/user-field";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { propertyEqual } from "discourse/lib/computed";
import { i18n } from "discourse/lib/computed";
import { propertyEqual, i18n } from "discourse/lib/computed";
import discourseComputed, {
observes,
on,

View File

@@ -1,11 +1,13 @@
import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators";
import discourseComputed, {
on,
observes,
} from "discourse-common/utils/decorators";
import { isEmpty } from "@ember/utils";
import { or } from "@ember/object/computed";
import { schedule } from "@ember/runloop";
import Component from "@ember/component";
import { bufferedProperty } from "discourse/mixins/buffered-content";
import { on, observes } from "discourse-common/utils/decorators";
import { popupAjaxError } from "discourse/lib/ajax-error";
import Category from "discourse/models/category";
import bootbox from "bootbox";

View File

@@ -1,8 +1,9 @@
import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators";
import discourseComputed, {
afterRender,
} from "discourse-common/utils/decorators";
import { equal } from "@ember/object/computed";
import Component from "@ember/component";
import { afterRender } from "discourse-common/utils/decorators";
const ACTIONS = ["delete", "delete_replies", "edit", "none"];

View File

@@ -1,8 +1,9 @@
import I18n from "I18n";
import discourseComputed from "discourse-common/utils/decorators";
import discourseComputed, { on } from "discourse-common/utils/decorators";
import { schedule } from "@ember/runloop";
import Component from "@ember/component";
import bootbox from "bootbox";
import ScreenedIpAddress from "admin/models/screened-ip-address";
/**
A form to create an IP address that will be blocked or allowed.
@@ -15,9 +16,6 @@ import bootbox from "bootbox";
as an argument.
**/
import ScreenedIpAddress from "admin/models/screened-ip-address";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({
classNames: ["screened-ip-address-form"],
formSubmitted: false,

View File

@@ -1,8 +1,7 @@
import discourseComputed from "discourse-common/utils/decorators";
import discourseComputed, { on } from "discourse-common/utils/decorators";
import { makeArray } from "discourse-common/lib/helpers";
import { empty, reads } from "@ember/object/computed";
import Component from "@ember/component";
import { on } from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: [":value-list"],