Skip to content

Commit 964b6d8

Browse files
matthiaskdr-rompecabezas
authored andcommitted
Enable the noParameterAssign rule
1 parent 25eb3f9 commit 964b6d8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

biome.json

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
},
1818
"style": {
1919
"noArguments": "off",
20-
"noParameterAssign": "off",
2120
"useTemplate": "off"
2221
},
2322
"suspicious": {

debug_toolbar/static/debug_toolbar/js/toolbar.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ const djdt = {
297297
const slowjax = debounce(ajax, 200);
298298

299299
function handleAjaxResponse(storeId) {
300-
storeId = encodeURIComponent(storeId);
301-
const dest = `${sidebarUrl}?store_id=${storeId}`;
300+
const encodedStoreId = encodeURIComponent(storeId);
301+
const dest = `${sidebarUrl}?store_id=${encodedStoreId}`;
302302
slowjax(dest).then(function (data) {
303303
if (djdt.needUpdateOnFetch) {
304-
replaceToolbarState(storeId, data);
304+
replaceToolbarState(encodedStoreId, data);
305305
}
306306
});
307307
}
@@ -352,9 +352,7 @@ const djdt = {
352352

353353
return cookies[key];
354354
},
355-
set(key, value, options) {
356-
options = options || {};
357-
355+
set(key, value, options = {}) {
358356
if (typeof options.expires === "number") {
359357
const days = options.expires;
360358
const t = (options.expires = new Date());

debug_toolbar/static/debug_toolbar/js/utils.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ const $$ = {
7171
};
7272

7373
function ajax(url, init) {
74-
init = Object.assign({ credentials: "same-origin" }, init);
75-
return fetch(url, init)
74+
return fetch(url, Object.assign({ credentials: "same-origin" }, init))
7675
.then(function (response) {
7776
if (response.ok) {
7877
return response.json().catch(function (error) {

0 commit comments

Comments
 (0)