Skip to content

Commit 63110e3

Browse files
Merge pull request #20654 from Snuffleupagus/eslint-unicorn-rules
Enable a couple of additional `eslint-plugin-unicorn` rules
2 parents b8a0911 + d595b09 commit 63110e3

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default [
139139
"unicorn/no-unnecessary-array-flat-depth": "error",
140140
"unicorn/no-unnecessary-array-splice-count": "error",
141141
"unicorn/no-unnecessary-slice-end": "error",
142+
"unicorn/no-useless-collection-argument": "error",
142143
"unicorn/no-useless-promise-resolve-reject": "error",
143144
"unicorn/no-useless-spread": "error",
144145
"unicorn/prefer-array-find": "error",
@@ -147,6 +148,7 @@ export default [
147148
"unicorn/prefer-array-index-of": "error",
148149
"unicorn/prefer-array-some": "error",
149150
"unicorn/prefer-at": "error",
151+
"unicorn/prefer-classlist-toggle": "error",
150152
"unicorn/prefer-date-now": "error",
151153
"unicorn/prefer-dom-node-append": "error",
152154
"unicorn/prefer-dom-node-remove": "error",

web/debugger.mjs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,10 @@ class Stepper {
333333
});
334334

335335
showBoxesCheckbox.addEventListener("change", () => {
336-
if (showBoxesCheckbox.checked) {
337-
this.pageContainer.classList.add("showDebugBoxes");
338-
} else {
339-
this.pageContainer.classList.remove("showDebugBoxes");
340-
}
336+
this.pageContainer.classList.toggle(
337+
"showDebugBoxes",
338+
showBoxesCheckbox.checked
339+
);
341340
});
342341
}
343342

0 commit comments

Comments
 (0)