Loose equality operator
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 2 points from that category, once per scan, no matter how many places it turns up.
What it detects
`==`/`!=` perform type coercion and are a common source of subtle bugs; prefer `===`/`!==`.
Why it matters
The == and != operators coerce types before comparing, so 0 == "" and null == undefined are both true. Comparisons like that pass in the demo and go wrong on the one input a real user sends, and the failure is silent because both branches look like working code.
How to fix it
Replace == with === and != with !== throughout. The one idiom sometimes kept on purpose is x == null to match both null and undefined; make that explicit as x === null || x === undefined, or configure ESLint's eqeqeq rule with the null ignore option if the team prefers the idiom. Run eqeqeq with --fix for the mechanical cases.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo