Skip to content

chore(lint): enable eqeqeq lint rule#32

Open
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-eqeqeq
Open

chore(lint): enable eqeqeq lint rule#32
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-eqeqeq

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Closes #31

What

Enable the ESLint eqeqeq rule as ["error", "always"] in eslint.config.mjs, requiring strict equality (=== / !==) throughout the codebase.

Why

Loose equality (== / !=) coerces operand types before comparing, producing surprising results that hide bugs (0 == ""true, null == undefinedtrue, [] == falsetrue). Strict equality compares without coercion, so comparisons stay predictable and type-safe — a natural fit for a TypeScript codebase.

Change

  • Single rule added to eslint.config.mjs; no other rules touched.
  • The codebase currently has 0 eqeqeq violations, so no source changes were needed — this is a preventive guardrail.

Verification (local)

  • npm run lint → passes (exit 0)
  • npm run build → passes (exit 0)

cc @tupe12334 for review.


This pull request was opened by the "Add lint rule → issue + PR (owned repos + my orgs) → Slack" routine of moadim.

Require strict equality (===/!==) across the codebase. Loose equality
performs implicit type coercion, which hides type bugs behind surprising
truthiness rules. The codebase currently has zero violations, so this is a
preventive guardrail with no code changes needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable eqeqeq lint rule

1 participant