You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable the ESLint eqeqeq rule (["error", "always"]) so the codebase always uses strict equality (=== / !==) instead of loose equality (== / !=).
What it catches
eqeqeq flags any use of the loose equality operators == and !=.
Why it improves code quality
Loose equality performs implicit type coercion before comparing, which produces surprising, bug-prone results:
0 == "" → true
0 == "0" → true
"" == "0" → false
null == undefined → true
[] == false → true
These coercion rules are easy to misremember and hide real type bugs. Strict equality (=== / !==) compares without coercion, so comparisons are predictable and type-safe — especially valuable in a TypeScript codebase where the type system already tracks the operand types. The rule is broadly recommended (it is part of eslint:recommended-adjacent style guides) and is auto-fixable in the unambiguous cases.
Scope
Enable only this one rule in eslint.config.mjs.
The codebase currently has 0 violations, so this is a preventive guardrail: npm run lint stays green today and blocks loose-equality from creeping in later.
This issue was opened by the "Add lint rule → issue + PR (owned repos + my orgs) → Slack" routine of moadim.
Activity
github-actions commentedon Jun 18, 2026
A workspace is ready for this issue.
Powered by Worktree · Install