Skip to content

Enable a few of the disabled biome rules #2091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable the noArguments rule
  • Loading branch information
matthiask committed Mar 2, 2025
commit 1b83530344eaf7dbcbe3c1e90a5d13219630e1cc
1 change: 0 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"noForEach": "off"
},
"style": {
"noArguments": "off",
"useTemplate": "off"
},
"suspicious": {
Expand Down
8 changes: 4 additions & 4 deletions debug_toolbar/static/debug_toolbar/js/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ const djdt = {

// Patch XHR / traditional AJAX requests
const origOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function () {
XMLHttpRequest.prototype.open = function (...args) {
this.addEventListener("load", function () {
// Chromium emits a "Refused to get unsafe header" uncatchable warning
// when the header can't be fetched. While it doesn't impede execution
Expand All @@ -319,12 +319,12 @@ const djdt = {
handleAjaxResponse(this.getResponseHeader("djdt-store-id"));
}
});
origOpen.apply(this, arguments);
origOpen.apply(this, args);
};

const origFetch = window.fetch;
window.fetch = function () {
const promise = origFetch.apply(this, arguments);
window.fetch = function (...args) {
const promise = origFetch.apply(this, args);
promise.then(function (response) {
if (response.headers.get("djdt-store-id") !== null) {
handleAjaxResponse(response.headers.get("djdt-store-id"));
Expand Down