mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 07:53:45 +08:00
DEV: Run prettier
This commit is contained in:
parent
5d4b240453
commit
9b841ea83f
|
@ -15,7 +15,10 @@ export default Route.extend({
|
|||
name: I18n.t("admin.badges.new_badge")
|
||||
});
|
||||
}
|
||||
return this.modelFor("adminBadges").findBy("id", parseInt(params.badge_id, 10));
|
||||
return this.modelFor("adminBadges").findBy(
|
||||
"id",
|
||||
parseInt(params.badge_id, 10)
|
||||
);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
|
@ -822,8 +822,9 @@ export default Component.extend({
|
|||
const index = parseInt(
|
||||
$(e.target)
|
||||
.parent()
|
||||
.attr("data-image-index")
|
||||
, 10);
|
||||
.attr("data-image-index"),
|
||||
10
|
||||
);
|
||||
|
||||
const scale = e.target.attributes["data-scale"].value;
|
||||
const matchingPlaceholder = this.get("composer.reply").match(
|
||||
|
|
|
@ -442,7 +442,10 @@ export default Component.extend({
|
|||
);
|
||||
$diversityScales.on("click", event => {
|
||||
const $selectedDiversity = $(event.currentTarget);
|
||||
this.set("selectedDiversity", parseInt($selectedDiversity.data("level"), 10));
|
||||
this.set(
|
||||
"selectedDiversity",
|
||||
parseInt($selectedDiversity.data("level"), 10)
|
||||
);
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -280,8 +280,7 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
|
|||
|
||||
const $panelBody = $(".panel-body", $panel);
|
||||
// 2 pixel fudge allows for firefox subpixel sizing stuff causing scrollbar
|
||||
let contentHeight =
|
||||
$(".panel-body-contents", $panel).height() + 2;
|
||||
let contentHeight = $(".panel-body-contents", $panel).height() + 2;
|
||||
|
||||
// We use a mutationObserver to check for style changes, so it's important
|
||||
// we don't set it if it doesn't change. Same goes for the $panelBody!
|
||||
|
|
|
@ -22,7 +22,10 @@ registerUnbound("number", (orig, params) => {
|
|||
|
||||
let title = I18n.toNumber(orig, { precision: 0 });
|
||||
if (params.numberKey) {
|
||||
title = I18n.t(params.numberKey, { number: title, count: parseInt(orig, 10) });
|
||||
title = I18n.t(params.numberKey, {
|
||||
number: title,
|
||||
count: parseInt(orig, 10)
|
||||
});
|
||||
}
|
||||
|
||||
let classNames = "number";
|
||||
|
|
|
@ -13,7 +13,10 @@ export default {
|
|||
window.location.search.indexOf("?preview_theme_id=") === 0
|
||||
) {
|
||||
// force preview theme id to always be carried along
|
||||
const themeId = parseInt(window.location.search.slice(18).split("&")[0], 10);
|
||||
const themeId = parseInt(
|
||||
window.location.search.slice(18).split("&")[0],
|
||||
10
|
||||
);
|
||||
if (!isNaN(themeId)) {
|
||||
const patchState = function(f) {
|
||||
const patched = window.history[f];
|
||||
|
|
|
@ -26,7 +26,10 @@ export default {
|
|||
const players = $("audio", $elem);
|
||||
if (players.length) {
|
||||
players.on("play", () => {
|
||||
const postId = parseInt($elem.closest("article").data("post-id"), 10);
|
||||
const postId = parseInt(
|
||||
$elem.closest("article").data("post-id"),
|
||||
10
|
||||
);
|
||||
if (postId) {
|
||||
api.preventCloak(postId);
|
||||
}
|
||||
|
|
|
@ -321,8 +321,9 @@ export class Tag {
|
|||
if (msoListClasses.includes(attrs.class)) {
|
||||
try {
|
||||
const level = parseInt(
|
||||
attrs.style.match(/level./)[0].replace("level", "")
|
||||
, 10);
|
||||
attrs.style.match(/level./)[0].replace("level", ""),
|
||||
10
|
||||
);
|
||||
indent = Array(level).join("\t") + indent;
|
||||
} finally {
|
||||
if (attrs.class === "MsoListParagraphCxSpFirst") {
|
||||
|
|
|
@ -60,11 +60,13 @@ export default RestModel.extend({
|
|||
post.updateActionsSummary(data.result);
|
||||
}
|
||||
const remaining = parseInt(
|
||||
data.xhr.getResponseHeader("Discourse-Actions-Remaining") || 0
|
||||
, 10);
|
||||
data.xhr.getResponseHeader("Discourse-Actions-Remaining") || 0,
|
||||
10
|
||||
);
|
||||
const max = parseInt(
|
||||
data.xhr.getResponseHeader("Discourse-Actions-Max") || 0
|
||||
, 10);
|
||||
data.xhr.getResponseHeader("Discourse-Actions-Max") || 0,
|
||||
10
|
||||
);
|
||||
return { acted: true, remaining, max };
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
@ -51,8 +51,9 @@ export default ComboBox.extend(TagsMixin, {
|
|||
parseInt(
|
||||
this.limit ||
|
||||
this.maximum ||
|
||||
this.get("siteSettings.max_tags_per_topic")
|
||||
, 10)
|
||||
this.get("siteSettings.max_tags_per_topic"),
|
||||
10
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -46,8 +46,9 @@ export default MultiSelectComponent.extend(TagsMixin, {
|
|||
parseInt(
|
||||
this.limit ||
|
||||
this.maximum ||
|
||||
this.get("siteSettings.max_tags_per_topic")
|
||||
, 10)
|
||||
this.get("siteSettings.max_tags_per_topic"),
|
||||
10
|
||||
)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user