Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

js: Convert static/js/billing/billing.js to ES6 module.

Anders Kaseorgce9d1d2b4d56
diff --git a/.eslintrc.json b/.eslintrc.json
index e23b08a7b6d..3566282a417 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -139,7 +139,6 @@
"alert_words_ui": false,
"attachments_ui": false,
"avatar": false,
- "billing": false,
"blueslip": false,
"bot_data": false,
"bridge": false,
diff --git a/static/js/billing/billing.js b/static/js/billing/billing.js
index 3aff0a4eae6..4a456a6c047 100644
--- a/static/js/billing/billing.js
+++ b/static/js/billing/billing.js
@@ -1,6 +1,4 @@
-"use strict";
-
-exports.initialize = function () {
+export function initialize() {
helpers.set_tab("billing");
const stripe_key = $("#payment-method").data("key");
@@ -33,10 +31,8 @@ exports.initialize = function () {
]);
e.preventDefault();
});
-};
-
-window.billing = exports;
+}
$(() => {
- exports.initialize();
+ initialize();
});
diff --git a/static/js/global.d.ts b/static/js/global.d.ts
index 0f42d8cac66..6474d35dae3 100644
--- a/static/js/global.d.ts
+++ b/static/js/global.d.ts
@@ -13,7 +13,6 @@ declare let admin: any;
declare let alert_words_ui: any;
declare let attachments_ui: any;
declare let avatar: any;
-declare let billing: any;
declare let blueslip: any;
declare let bot_data: any;
declare let buddy_data: any;