style: add eslint-disable comments for intentional == null checks
Added // eslint-disable-next-line eqeqeq comments for intentional null/undefined checks: - sender-key-message.ts: checking for null OR undefined parameters - WAM/encode.ts: checking for null OR undefined id - baileys-event-stream.test.ts: renamed unused event parameter to _event These changes are COSMETIC ONLY - no logic changed: - Build still passes ✅ - All tests still work ✅ - API behavior unchanged ✅ The == null pattern is intentionally used to check for BOTH null AND undefined, which is the correct behavior for these optional parameters. https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
This commit is contained in:
@@ -42,6 +42,7 @@ export class SenderKeyMessage extends CiphertextMessage {
|
||||
: senderKeyMessage.ciphertext
|
||||
this.signature = signature
|
||||
} else {
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (ciphertext == null || keyId == null || iteration == null || signatureKey == null) {
|
||||
throw new Error('Missing required parameters for SenderKeyMessage construction')
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ function encodeEvents(binaryInfo: BinaryInfo) {
|
||||
}
|
||||
|
||||
const fieldFlag = extended ? FLAG_EVENT : FLAG_FIELD | FLAG_EXTENDED
|
||||
// eslint-disable-next-line eqeqeq
|
||||
if (id == null) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ describe('BaileysEventStream', () => {
|
||||
})
|
||||
|
||||
it('should remove filter', async () => {
|
||||
const filter = (event: StreamEvent) => false
|
||||
const filter = (_event: StreamEvent) => false
|
||||
|
||||
stream.addFilter(filter)
|
||||
stream.removeFilter(filter)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Testes unitários para trace-context.ts
|
||||
*/
|
||||
|
||||
import { beforeEach, describe, expect, it } from '@jest/globals'
|
||||
import { beforeEach as beforeEach, describe, expect, it } from '@jest/globals'
|
||||
import {
|
||||
addSpanEvent,
|
||||
createPrecisionTimer,
|
||||
|
||||
Reference in New Issue
Block a user