Skip to content

Fix theme-watch crashing on lint errors - #1883

Merged
ricksbrown merged 3 commits into
hermionefrom
feature/build-fix
May 25, 2026
Merged

Fix theme-watch crashing on lint errors#1883
ricksbrown merged 3 commits into
hermionefrom
feature/build-fix

Address several sonarqube warnings

e6bf564
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed May 19, 2026 in 1m 45s

Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 339 in wcomponents-theme/src/main/js/wc/ui/tabset.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'subscribe' is deprecated.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjY_-zdkHPQUd8Hq&open=AZ49jjY_-zdkHPQUd8Hq&pullRequest=1883

Check warning on line 18 in wcomponents-theme/src/main/js/wc/dom/uid.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjix-zdkHPQUd8Ko&open=AZ49jjix-zdkHPQUd8Ko&pullRequest=1883

Check failure on line 84 in wcomponents-theme/src/main/js/wc/ui/validation/isComplete.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not pass function `filter` directly to `.some(…)`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49WP6kDZ23z912wm0E&open=AZ49WP6kDZ23z912wm0E&pullRequest=1883

Check failure on line 31 in wcomponents-theme/src/main/js/wc/ui/navigationButton.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.dataset` over `getAttribute(…)`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjLx-zdkHPQUd8Cc&open=AZ49jjLx-zdkHPQUd8Cc&pullRequest=1883

Check warning on line 373 in wcomponents-theme/src/main/js/wc/ajax/ajax.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjcb-zdkHPQUd8JP&open=AZ49jjcb-zdkHPQUd8JP&pullRequest=1883

Check warning on line 83 in wcomponents-theme/src/main/js/wc/dom/color.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjiW-zdkHPQUd8Ki&open=AZ49jjiW-zdkHPQUd8Ki&pullRequest=1883

Check warning on line 76 in wcomponents-theme/src/main/js/wc/ui/popup.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjXh-zdkHPQUd8HU&open=AZ49jjXh-zdkHPQUd8HU&pullRequest=1883

Check failure on line 313 in wcomponents-theme/src/main/js/wc/ui/ajax/processResponse.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `element.before(child)` over `parent.insertBefore(child, element)`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjUY-zdkHPQUd8FU&open=AZ49jjUY-zdkHPQUd8FU&pullRequest=1883

Check warning on line 327 in wcomponents-theme/src/main/js/wc/ui/multiFileUploader.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'get' is deprecated.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjVi-zdkHPQUd8F3&open=AZ49jjVi-zdkHPQUd8F3&pullRequest=1883

Check warning on line 56 in wcomponents-theme/src/main/js/wc/dom/cbrShedPublisher.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer using an optional chain expression instead, as it's more concise and easier to read.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjjH-zdkHPQUd8Kr&open=AZ49jjjH-zdkHPQUd8Kr&pullRequest=1883

Check warning on line 66 in wcomponents-theme/src/main/js/wc/ui/timeoutWarn.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not call `Array#push()` multiple times.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjUp-zdkHPQUd8Fc&open=AZ49jjUp-zdkHPQUd8Fc&pullRequest=1883

Check failure on line 1294 in wcomponents-theme/src/main/js/wc/ui/imageEdit.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `.dataset` over `getAttribute(…)`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjXS-zdkHPQUd8HQ&open=AZ49jjXS-zdkHPQUd8HQ&pullRequest=1883

Check warning on line 96 in wcomponents-theme/src/main/js/wc/ui/positionable.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjWO-zdkHPQUd8GS&open=AZ49jjWO-zdkHPQUd8GS&pullRequest=1883

Check warning on line 85 in wcomponents-theme/src/main/js/wc/ui/collapsibleToggle.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjTN-zdkHPQUd8E2&open=AZ49jjTN-zdkHPQUd8E2&pullRequest=1883

Check failure on line 20 in wcomponents-theme/src/main/js/wc/ui/internalLink.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjXt-zdkHPQUd8HY&open=AZ49jjXt-zdkHPQUd8HY&pullRequest=1883

Check warning on line 769 in wcomponents-theme/src/main/js/wc/Observer.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move function 'sortSubscribers' to the outer scope.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjn1-zdkHPQUd8L9&open=AZ49jjn1-zdkHPQUd8L9&pullRequest=1883

Check warning on line 119 in wcomponents-theme/src/main/js/wc/ui/tabset.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjY_-zdkHPQUd8Hn&open=AZ49jjY_-zdkHPQUd8Hn&pullRequest=1883

Check warning on line 117 in wcomponents-theme/src/main/js/wc/ui/ImageCapture.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move function 'errCb' to the outer scope.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjaz-zdkHPQUd8Ib&open=AZ49jjaz-zdkHPQUd8Ib&pullRequest=1883

Check warning on line 60 in wcomponents-theme/src/main/js/wc/i18n/i18n.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

'get' is deprecated.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjoQ-zdkHPQUd8MC&open=AZ49jjoQ-zdkHPQUd8MC&pullRequest=1883

Check failure on line 229 in wcomponents-theme/src/main/js/wc/ui/resizeable.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjWt-zdkHPQUd8Gz&open=AZ49jjWt-zdkHPQUd8Gz&pullRequest=1883

Check warning on line 43 in wcomponents-theme/src/main/js/wc/loader/prefetch.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjmR-zdkHPQUd8Lb&open=AZ49jjmR-zdkHPQUd8Lb&pullRequest=1883

Check warning on line 98 in wcomponents-theme/src/main/js/wc/ui/positionable.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Unexpected negated condition.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjWO-zdkHPQUd8GT&open=AZ49jjWO-zdkHPQUd8GT&pullRequest=1883

Check warning on line 285 in wcomponents-theme/src/main/js/wc/ui/SubordinateAction.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Expected a `for-of` loop instead of a `for` loop with this simple iteration.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjSp-zdkHPQUd8Er&open=AZ49jjSp-zdkHPQUd8Er&pullRequest=1883

Check warning on line 256 in wcomponents-theme/src/main/js/wc/ui/resizeable.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Prefer `Number.parseInt` over `parseInt`.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjWt-zdkHPQUd8G2&open=AZ49jjWt-zdkHPQUd8G2&pullRequest=1883

Check warning on line 1226 in wcomponents-theme/src/main/js/wc/ui/imageEdit.mjs

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=bordertech-wcomponents&issues=AZ49jjXS-zdkHPQUd8HO&open=AZ49jjXS-zdkHPQUd8HO&pullRequest=1883