diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..4d21ca7 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,5 @@ +{ + "globals": { + "Stripe": true, + } +} diff --git a/assets/javascripts/discourse/lib/donation-utilities.js.es6 b/assets/javascripts/discourse/lib/donation-utilities.js.es6 index 6f82bf2..924ee4f 100644 --- a/assets/javascripts/discourse/lib/donation-utilities.js.es6 +++ b/assets/javascripts/discourse/lib/donation-utilities.js.es6 @@ -19,13 +19,13 @@ const formatAnchor = function(type = null, time = moment()) { } return moment(time).format(format); -} +}; const zeroDecimalCurrencies = ['MGA', 'BIF', 'CLP', 'PYG', 'DFJ', 'RWF', 'GNF', 'UGX', 'JPY', 'VND', 'VUV', 'XAF', 'KMF', 'KRW', 'XOF', 'XPF']; const formatAmount = function(amount, currency) { let zeroDecimal = zeroDecimalCurrencies.indexOf(currency) > -1; return zeroDecimal ? amount : (amount / 100).toFixed(2); -} +}; -export { formatAnchor, formatAmount, zeroDecimalCurrencies } +export { formatAnchor, formatAmount, zeroDecimalCurrencies }; diff --git a/assets/javascripts/discourse/widgets/donations-category-header-widget.js.es6 b/assets/javascripts/discourse/widgets/donations-category-header-widget.js.es6 index f062f15..354c45d 100644 --- a/assets/javascripts/discourse/widgets/donations-category-header-widget.js.es6 +++ b/assets/javascripts/discourse/widgets/donations-category-header-widget.js.es6 @@ -2,7 +2,6 @@ import { createWidget } from 'discourse/widgets/widget'; import { h } from 'virtual-dom'; import { avatarFor } from 'discourse/widgets/post'; import { userPath } from "discourse/lib/url"; -import { iconNode } from "discourse-common/lib/icon-library"; function donationDisplay(amount, type) { return h(`div.donations-${type}`, [ @@ -85,7 +84,7 @@ createWidget('category-header-widget', { } }) ]) - ) + ); } if (category.donations_release_latest) { @@ -104,7 +103,7 @@ createWidget('category-header-widget', { } }) ]) - ) + ); } if (metadata.length) { diff --git a/assets/javascripts/lib/discourse-markdown/stripe.js.es6 b/assets/javascripts/lib/discourse-markdown/stripe.js.es6 index 084338c..48ec98c 100644 --- a/assets/javascripts/lib/discourse-markdown/stripe.js.es6 +++ b/assets/javascripts/lib/discourse-markdown/stripe.js.es6 @@ -85,8 +85,6 @@ export function setup(helper) { ]); if (helper.markdownIt) { setupMarkdownIt(helper, siteSettings); - } else { - console.log("Please upgrade Discourse to a later version in order to use this plugin"); } }); }