From 27bdcdc02305906660df23213e1484e96fbc1ded Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 17 Sep 2025 10:24:06 +0200 Subject: [PATCH] lint: make things a bit tighter (no cond assign, no implicit switch fall through) --- .eslintrc.json | 2 -- src/client/widgets/common/canvas.mjs | 1 + src/client/widgets/containers/modal.mjs | 1 + src/client/widgets/containers/panel.mjs | 2 ++ src/client/widgets/containers/tab.mjs | 2 ++ 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 26bb2595..1ba1b25e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,10 +11,8 @@ "rules": { "no-prototype-builtins": "off", "no-console": "off", - "no-cond-assign": "off", "no-useless-escape": "off", "no-self-assign": "off", - "no-fallthrough": "off", "no-empty": [ "error", { diff --git a/src/client/widgets/common/canvas.mjs b/src/client/widgets/common/canvas.mjs index a347fb84..6f63d34a 100644 --- a/src/client/widgets/common/canvas.mjs +++ b/src/client/widgets/common/canvas.mjs @@ -218,6 +218,7 @@ class Canvas extends Widget { this.batchDraw() }) }) + // falls through case 'lineWidth': case 'padding': resize.check(this.canvas, true) diff --git a/src/client/widgets/containers/modal.mjs b/src/client/widgets/containers/modal.mjs index be8013c7..4689f4fc 100644 --- a/src/client/widgets/containers/modal.mjs +++ b/src/client/widgets/containers/modal.mjs @@ -272,6 +272,7 @@ class Modal extends Panel { case 'label': this.updateLabel() + // falls through case 'popupLabel': if (this.value) { this.updatePopupLabel() diff --git a/src/client/widgets/containers/panel.mjs b/src/client/widgets/containers/panel.mjs index 6ceb0bb5..1540d86b 100644 --- a/src/client/widgets/containers/panel.mjs +++ b/src/client/widgets/containers/panel.mjs @@ -403,8 +403,10 @@ class Panel extends Container() { case 'colorBg': this.setCssVariables() + // falls through case 'colorWidget': if (iOS13 && this.getProp('scroll')) this.checkScrollBars() + // falls through case 'colorText': case 'colorFill': case 'colorStroke': diff --git a/src/client/widgets/containers/tab.mjs b/src/client/widgets/containers/tab.mjs index 7ec14d18..35f113c9 100644 --- a/src/client/widgets/containers/tab.mjs +++ b/src/client/widgets/containers/tab.mjs @@ -87,8 +87,10 @@ class Tab extends Panel { case 'label': this.updateLabel() + // falls through case 'visible': resize.check(this.widget, true) + // falls through case 'colorText': case 'colorWidget': case 'colorFill':