appease eslint

This commit is contained in:
Rimian Perkins 2019-08-27 20:18:02 +10:00
parent 6f826ce7a0
commit 675c3d27ba
4 changed files with 10 additions and 8 deletions

5
.eslintrc Normal file
View File

@ -0,0 +1,5 @@
{
"globals": {
"Stripe": true,
}
}

View File

@ -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 };

View File

@ -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) {

View File

@ -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");
}
});
}