Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#1665)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0-alpha.0](pre-commit/mirrors-prettier@v2.7.1...v3.0.0-alpha.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] committed Aug 28, 2022
1 parent e566305 commit 6a34e00
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
- id: rst-backticks
- id: rst-directive-colons
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.0-alpha.0
hooks:
- id: prettier
types_or: [javascript, css]
Expand Down
12 changes: 6 additions & 6 deletions debug_toolbar/static/debug_toolbar/js/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function refreshHistory() {
const formTarget = djDebug.querySelector(".refreshHistory");
const container = document.getElementById("djdtHistoryRequests");
const oldIds = new Set(
pluckData(container.querySelectorAll("tr[data-store-id]"), "storeId")
pluckData(container.querySelectorAll("tr[data-store-id]"), "storeId"),
);

ajaxForm(formTarget)
Expand All @@ -44,8 +44,8 @@ function refreshHistory() {
const allIds = new Set(
pluckData(
container.querySelectorAll("tr[data-store-id]"),
"storeId"
)
"storeId",
),
);
const newIds = difference(allIds, oldIds);
const lastRequestId = newIds.values().next().value;
Expand All @@ -58,7 +58,7 @@ function refreshHistory() {
.then(function (refreshInfo) {
refreshInfo.newIds.forEach(function (newId) {
const row = container.querySelector(
`tr[data-store-id="${newId}"]`
`tr[data-store-id="${newId}"]`,
);
row.classList.add("flash-new");
});
Expand All @@ -74,7 +74,7 @@ function refreshHistory() {

function switchHistory(newStoreId) {
const formTarget = djDebug.querySelector(
".switchHistory[data-store-id='" + newStoreId + "']"
".switchHistory[data-store-id='" + newStoreId + "']",
);
const tbody = formTarget.closest("tbody");

Expand All @@ -88,7 +88,7 @@ function switchHistory(newStoreId) {
if (Object.keys(data).length === 0) {
const container = document.getElementById("djdtHistoryRequests");
container.querySelector(
'button[data-store-id="' + newStoreId + '"]'
'button[data-store-id="' + newStoreId + '"]',
).innerHTML = "Switch [EXPIRED]";
}
replaceToolbarState(newStoreId, data);
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/static/debug_toolbar/js/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function insertBrowserTiming() {
")</td>";
row.querySelector("rect").setAttribute(
"width",
getCSSWidth(stat, endStat)
getCSSWidth(stat, endStat),
);
} else {
// Render a point in time
Expand Down
16 changes: 8 additions & 8 deletions debug_toolbar/static/debug_toolbar/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ const djdt = {
this.parentElement.classList.add("djdt-active");

const inner = current.querySelector(
".djDebugPanelContent .djdt-scroll"
".djDebugPanelContent .djdt-scroll",
),
store_id = djDebug.dataset.storeId;
if (store_id && inner.children.length === 0) {
const url = new URL(
djDebug.dataset.renderPanelUrl,
window.location
window.location,
);
url.searchParams.append("store_id", store_id);
url.searchParams.append("panel_id", panelId);
Expand All @@ -49,18 +49,18 @@ const djdt = {
djDebug.dispatchEvent(
new CustomEvent("djdt.panel.render", {
detail: { panelId: panelId },
})
}),
);
});
} else {
djDebug.dispatchEvent(
new CustomEvent("djdt.panel.render", {
detail: { panelId: panelId },
})
}),
);
}
}
}
},
);
$$.on(djDebug, "click", ".djDebugClose", function () {
djdt.hide_one_level();
Expand All @@ -76,9 +76,9 @@ const djdt = {
{
path: "/",
expires: 10,
}
},
);
}
},
);

// Used by the SQL and template panels
Expand Down Expand Up @@ -219,7 +219,7 @@ const djdt = {
// set handle position
const handleTop = Math.min(
localStorage.getItem("djdt.top") || 0,
window.innerHeight - handle.offsetWidth
window.innerHeight - handle.offsetWidth,
);
handle.style.top = handleTop + "px";
},
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/static/debug_toolbar/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function ajax(url, init) {
return response.json();
}
return Promise.reject(
new Error(response.status + ": " + response.statusText)
new Error(response.status + ": " + response.statusText),
);
})
.catch(function (error) {
Expand Down

0 comments on commit 6a34e00

Please sign in to comment.