]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
style: codebase consistency sweep — JSDoc @returns backticks + != null idiom (#2009)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 15 Jul 2026 16:56:37 +0000 (18:56 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2026 16:56:37 +0000 (18:56 +0200)
commit0fdfaddffd571d4110849029cdf97bbf1d0309cf
tree0c887a62625a317d00f969ef2caf9ac7d6e74514
parent993c396718c9146bbed1f6e44ec8b57c21192c32
style: codebase consistency sweep — JSDoc @returns backticks + != null idiom (#2009)

Behavior-preserving codebase style-consistency sweep. Closes #1966.

- Backtick 49 JSDoc @returns boolean literals across 17 files (lowercase True/False).
- Align !== undefined -> != null on number|undefined guards in OCPP20IncomingRequestService.ts (13 tokens); conditional-spread inclusion guards preserved as !== undefined.
- Extend != null idiom to OCPP20VariableManager min/max ternaries + presence guards and the negated EVSE guard.
- Fix OCPP20AuthAdapter.validateConfiguration @returns (synchronous boolean; was falsely 'Promise resolving to').

Gap C (String(previousRequestId) -> .toString()) dropped: premise false — operand is number|undefined, .toString() would fail typecheck (TS18048); String() is the only behavior-preserving form.

All gates green (format/typecheck/lint/build/test, fail=0). Reviewed across multiple multi-agent rounds with cross-validation.
18 files changed:
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/2.0/OCPP20CertificateManager.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20VariableManager.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/charging-station/ocpp/2.0/__testable__/OCPP20VariableManagerTestable.ts
src/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.ts
src/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.ts
src/charging-station/ocpp/auth/cache/InMemoryAuthCache.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
src/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.ts
src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts
src/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.ts
src/charging-station/ocpp/auth/types/AuthTypes.ts
src/charging-station/ocpp/auth/utils/AuthHelpers.ts
src/charging-station/ocpp/auth/utils/AuthValidators.ts
src/utils/ConfigurationMigrations.ts