Skip to content

Enable eqeqeq lint rule #31

Closed
Closed

Description

@tupe12334

Summary

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

  1. github-actions commented on Jun 18, 2026

    @github-actions

    A workspace is ready for this issue.

    Open workspace →

    Powered by Worktree · Install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions