/** * Copyright (c) 2025 Ofri Peretz * Licensed under the MIT License. Use of this source code is governed by the * MIT license that can be found in the LICENSE file. */ /** * ESLint Rule: no-insecure-comparison * Detects insecure comparison operators (==, !=) that can lead to type coercion vulnerabilities * CWE-697: Incorrect Comparison * * @see https://cwe.mitre.org/data/definitions/697.html * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'insecureComparison' | 'useStrictEquality' | 'timingUnsafeComparison'; export interface Options { /** Allow insecure comparison in test files. Default: false */ allowInTests?: boolean; /** Additional patterns to ignore. Default: [] */ ignorePatterns?: string[]; } type RuleOptions = [Options?]; export declare const noInsecureComparison: TSESLint.RuleModule & { name: string; }; export {};