From ce9d1d2b4d5633ada8db0eaed1c2e7a6d3dba999 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 10 Feb 2021 08:11:54 -0800 Subject: [PATCH] js: Convert static/js/billing/billing.js to ES6 module. Signed-off-by: Anders Kaseorg --- .eslintrc.json | 1 - static/js/billing/billing.js | 10 +++------- static/js/global.d.ts | 1 - 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e23b08a7b6..3566282a41 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 3aff0a4eae..4a456a6c04 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 0f42d8cac6..6474d35dae 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;