refactor: adopt POSITIONS constants and fix ESLint warnings

Replace hardcoded position strings with POSITIONS.* constants.
Prefix unused variables with _ to resolve no-unused-vars warnings.
Fix no-prototype-builtins where applicable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Rene De Ren
2026-03-11 15:35:28 +01:00
parent 294cf49521
commit 1b7285f29e

View File

@@ -381,7 +381,7 @@ class Measurement {
const lowPass = this.lowPassFilter(arr); // Apply low-pass filter const lowPass = this.lowPassFilter(arr); // Apply low-pass filter
const highPass = this.highPassFilter(arr); // Apply high-pass filter const highPass = this.highPassFilter(arr); // Apply high-pass filter
return arr.map((val, idx) => lowPass + highPass - val).pop(); // Combine the filters return arr.map((val, _idx) => lowPass + highPass - val).pop(); // Combine the filters
} }
weightedMovingAverage(arr) { weightedMovingAverage(arr) {
@@ -558,7 +558,7 @@ const configuration = {
enabled: true, enabled: true,
}, },
functionality: { functionality: {
positionVsParent: "upstream" positionVsParent: POSITIONS.UPSTREAM
} }
}; };