DEV: Update ESLint to remove I18n global
Also fixes missed imports in core.
This commit is contained in:
parent
a047004c9a
commit
aa2d040526
|
@ -143,6 +143,7 @@ var define, requirejs;
|
|||
guidFor: Ember.guidFor
|
||||
},
|
||||
I18n: {
|
||||
// eslint-disable-next-line
|
||||
default: I18n
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@ import { isEmpty } from "@ember/utils";
|
|||
import EmberObject from "@ember/object";
|
||||
import discourseComputed, { on } from "discourse-common/utils/decorators";
|
||||
import Mixin from "@ember/object/mixin";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default Mixin.create({
|
||||
@on("init")
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const ps = require("discourse/lib/preload-store").default;
|
||||
const preloadedDataElement = document.getElementById("data-preloaded");
|
||||
const setupData = document.getElementById("data-discourse-setup").dataset;
|
||||
const I18n = require("I18n").default;
|
||||
|
||||
if (preloadedDataElement) {
|
||||
const preloaded = JSON.parse(preloadedDataElement.dataset.preloaded);
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"chrome-launcher": "^0.12.0",
|
||||
"chrome-remote-interface": "^0.25",
|
||||
"ember-template-lint": "^2.5.2",
|
||||
"eslint-config-discourse": "1.1.1",
|
||||
"eslint-config-discourse": "1.1.2",
|
||||
"eslint-plugin-discourse-ember": "0.0.3",
|
||||
"lodash-cli": "https://github.com/lodash-archive/lodash-cli.git",
|
||||
"pretender": "^1.6",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Admin - User Emails", { loggedIn: true });
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Admin - Users List", { loggedIn: true });
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import {
|
||||
acceptance,
|
||||
loggedInUser,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers";
|
||||
import { _clearSnapshots } from "select-kit/components/composer-actions";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import pretender from "helpers/create-pretender";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { run } from "@ember/runloop";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
let userFound = false;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Group Members");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import pretender from "helpers/create-pretender";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("New Group");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import pretender from "helpers/create-pretender";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
let userFound = false;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import PreloadStore from "discourse/lib/preload-store";
|
||||
import { parsePostData } from "helpers/create-pretender";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Personal Message", {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance, updateCurrentUser } from "helpers/qunit-helpers";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import { clearTopicFooterButtons } from "discourse/lib/register-topic-footer-button";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
acceptance("Topic move posts", { loggedIn: true });
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import Theme from "admin/models/theme";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import Theme, { THEMES, COMPONENTS } from "admin/models/theme";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
moduleForComponent("d-button", { integration: true });
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { next } from "@ember/runloop";
|
||||
import { clearToolbarCallbacks } from "discourse/components/d-editor";
|
||||
import componentTest from "helpers/component-test";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
moduleForComponent("secret-value-list", { integration: true });
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import { testSelectKitModule } from "helpers/select-kit-helper";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import Category from "discourse/models/category";
|
||||
import componentTest from "helpers/component-test";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import { testSelectKitModule } from "helpers/select-kit-helper";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import { testSelectKitModule } from "helpers/select-kit-helper";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
import { testSelectKitModule } from "helpers/select-kit-helper";
|
||||
import Site from "discourse/models/site";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import componentTest from "helpers/component-test";
|
||||
import Topic from "discourse/models/topic";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import componentTest from "helpers/component-test";
|
||||
import Topic from "discourse/models/topic";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import componentTest from "helpers/component-test";
|
||||
|
||||
moduleForComponent("text-field", { integration: true });
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { mapRoutes } from "discourse/mapping-router";
|
||||
|
||||
moduleFor("controller:create-account", "controller:create-account", {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
/*jshint maxlen:10000000 */
|
||||
export default {
|
||||
"/t/280/1.json": {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import LocalizationInitializer from "discourse/initializers/localization";
|
||||
|
||||
QUnit.module("initializer:localization", {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import {
|
||||
setting,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
QUnit.module("lib:i18n", {
|
||||
_locale: I18n.locale,
|
||||
_fallbackLocale: I18n.fallbackLocale,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import {
|
||||
translateResults,
|
||||
searchContextDescription
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import {
|
||||
validateUploadedFiles,
|
||||
authorizedExtensions,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import UserDraft from "discourse/models/user-draft";
|
||||
import { NEW_TOPIC_KEY } from "discourse/models/composer";
|
||||
import User from "discourse/models/user";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import EmberObject from "@ember/object";
|
||||
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
||||
|
||||
moduleForWidget("widget-dropdown");
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import I18n from "I18n";
|
||||
import { next } from "@ember/runloop";
|
||||
import { moduleForWidget, widgetTest } from "helpers/widget-test";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
|
|
|
@ -978,10 +978,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
|
|||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
eslint-config-discourse@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-1.1.1.tgz#8a7f7f6f1a388b0e88f5b79145ae2a8b4a13e3d4"
|
||||
integrity sha512-b3dp9DOcXYWkPQpXms/bMDy0Scb6DO/nZAAsl5I9yTNhtkx96zZMTp9QEyC8QaCXOTUpIXEE6V+Mpyjtsk3gWg==
|
||||
eslint-config-discourse@1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-discourse/-/eslint-config-discourse-1.1.2.tgz#f8569579ea3fc348a989bbab0780a5c426038744"
|
||||
integrity sha512-yF29RxKyvFvQbnICCGext0rlXzQMm4AZuBxqOVFonjb0sUbB/08l/FyLHmXKpKgLCEMV6RrJKB7xxPL6twtUkA==
|
||||
dependencies:
|
||||
babel-eslint "^8.2"
|
||||
eslint "^4.19"
|
||||
|
|
Loading…
Reference in New Issue