Skip to content

Commit

Permalink
Back to erroring out when encountering unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Sep 11, 2024
1 parent c15796e commit 1d10777
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions content_editor/static/content_editor/content_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
set(name, value) {
try {
storage.setItem(prefix + name, JSON.stringify(value))
} catch (_e) {
} finally {
/* empty */
}
},
get(name) {
try {
return JSON.parse(storage.getItem(prefix + name))
} catch (_e) {
} finally {
/* empty */
}
},
Expand Down Expand Up @@ -209,7 +209,7 @@
e.dataTransfer.effectAllowed = "move"
try {
e.dataTransfer.setData("text/plain", "")
} catch (_e) {
} finally {
// IE11 needs this.
}

Expand Down Expand Up @@ -363,7 +363,7 @@
}
const debouncedIndentInlines = debounce(updateSections, 10)

const resizeObserver = new ResizeObserver((entries) => {
const resizeObserver = new ResizeObserver((_entries) => {
debouncedIndentInlines()
})
resizeObserver.observe(orderMachineWrapper[0])
Expand Down
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ export default [
pluginJs.configs.recommended,
{
rules: {
"no-unused-vars": "warn"
"no-unused-vars": [
"error",
{argsIgnorePattern: "^_", varsIgnorePattern: "^_"}
]
},
},
];

0 comments on commit 1d10777

Please sign in to comment.