Skip to content

Commit c140229

Browse files
committed
Clear CodeQL note alerts (ASI + unused local)
- DOMObserver: add missing semicolon after forEach call (js/automatic-semicolon-insertion). - defineGetterDetector: drop unused `const value` assignment; use `void` to keep the getter-triggering property access as a pure side effect (js/unused-local-variable).
1 parent a4e04c8 commit c140229

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/utils/DOMObserver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class DomObserver {
103103
if (child instanceof HTMLElement) {
104104
addedElements.push(child);
105105
}
106-
})
106+
});
107107
}
108108

109109
if (this.options.debugMode) {

src/utils/detectors/defineGetterDetector.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,8 @@ export class DefineGetterDetector extends AbstractDevToolsDetector {
169169
configurable: true,
170170
})
171171

172-
// Access the property to see if the getter works
173-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
174-
const value = (testDiv as unknown as { testProp: string }).testProp
172+
// Access the property to trigger the getter (side effect only).
173+
void (testDiv as unknown as { testProp: string }).testProp;
175174

176175
return testValue
177176
// eslint-disable-next-line @typescript-eslint/no-unused-vars

0 commit comments

Comments
 (0)