Finish repo-wide strict equality sweep and enable eqeqeq #517
Labels
No labels
question
blocked
duplicate
needs
approval
needs
criteria
needs
estimate
needs
tests
question
step
doing
step
review
step
testing
step
todo
step
uat
type
admin
type
alert
type
bug
type
change
type
defect
type
dependencies
type
epic
type
idea
type
incident
type
investigation
type
spike
type
story
wontfix
No project
No assignees
2 participants
Notifications
Total time spent: 30 minutes
Due date
Vylpes
30 minutes
No due date set.
Dependencies
No dependencies set
Reference
External/card-drop#517
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #487 (2026 Code Clean Up). Spun out of the review note on PR #515.
Why
PR #515 only converted the comparisons in the five files named by the #487 checklist (
InventoryHelper,GetUnclaimedCardsHelper,stats,GetCardsHelper,sacrifice) — 20==/!=sites.At the time of that PR there were still about 73 loose comparisons across 37 files.
eqeqeqwas not enabled in ESLint, because turning it on fails lint on every unswept file; it has to land with (or after) the final sweep.This is mechanical and is much faster with a local
yarn lint:fixthan through the bot's one-file-at-a-time API.Suggested approach
release/0.12.0.eqeqeqineslint.config.mjs(error).yarn lint:fix(or equivalent) and clear every remaining==/!=the rule reports.== nullonly where you truly want bothnullandundefined, or rewrite to explicit checks; do not leave bare==.yarn build,yarn lint,yarn test./drop,/inventory, and/statsagainst real cards before release.Acceptance criteria
==/!=insrc//tests/except any explicitly justified, lint-disabled sites.eqeqeqis enabled andyarn lintis clean.yarn buildandyarn testare clean.Related
===against real card JSON)Note on eslint config globs
Separately,
eslint.config.mjscurrently scopes arulesblock tofiles: ["./src", "./tests"], which matches no files, so several style rules are inert. That is a different fix; do not conflate it with enablingeqeqequnless you are already touching that config.Blocked until #516 is done
QA results (step/testing) — FAIL
Tested on
release/0.12.0@d4bd48c(includes merged #519 strict-equality sweep and #521 eslint files-glob fix).eqeqeqenabled (eslint.config.mjs,always+null: ignore)==/!=insrc//tests/!= null/== null-style sites left (allowed bynull: ignore); no bare loose equalityyarn build(tsc)yarn testyarn lintLint failure
yarn lintreports 8×comma-dangleintests/stringDropdowns/Inventory.test.ts(lines 28, 29, 36, 44, 46, 47, 53, 93). All auto-fixable witheslint --fix.These only surface now because #521 corrected the eslint
filesglob so style rules actually apply totests/**/*. Noeqeqeqviolations.Next step
Moving back to
step/todofor a small follow-up: strip the trailing commas (oryarn lint:fixthat file), confirmyarn lintis clean, then re-enter review/testing.Manual Discord smoke (
/drop,/inventory,/stats) still recommended at UAT once lint is green — not runnable here withoutDATA_DIRcard assets.Lint follow-up ready for review
Opened #524 off
release/0.12.0(cursor/517-inventory-test-comma-dangle).Fixes the 8×
comma-danglefailures intests/stringDropdowns/Inventory.test.tsfrom the previous QA run. Locally:yarn lint,yarn build, andyarn test(28/196) all pass.Moved to
step/reviewand assigned to @Vylpes. Please approve/merge when happy; do not auto-close this ticket from the PR (needs testing after merge).QA results (step/testing) — PASS
Tested on
release/0.12.0@42260e9(includes merged PR #524 comma-dangle fix forInventory.test.ts, plus earlier #519/#521).eqeqeqenabled (eslint.config.mjs,always+null: ignore)==/!=insrc//tests/!= nullsites left (allowed bynull: ignore); no bare loose equalityyarn build(tsc)yarn lint(eslint .)yarn testtests/stringDropdowns/Inventory.test.tscomma-dangleMoved
step/testing→step/uatand assigned to @Vylpes for UAT.I need to consolidate the rules back now
PR #525 first-pass review done (approved).
Your move of
eqeqeqinto the main rules block is safe:src/**/*/tests/**/*match real files,yarn lintis clean, and a probe==still fails the rule. Requested second review from VylpesTester (you are the author).Leaving at
step/reviewand assigning to you for merge/second review.QA results (step/testing) — PASS
Re-tested on
release/0.12.0@b948124after merged PR #525 (moveeqeqeqinto the mainsrc/**/*/tests/**/*rules block).eqeqeqin main rules block (always+null: ignore)==/!=insrc//tests/!= nullsites left (allowed); no bare loose equality==still failseqeqequnder the consolidated configyarn build(tsc)yarn lint(eslint .)yarn testMoved
step/testing→step/uatand assigned to @Vylpes for UAT.Manual Discord smoke (
/drop,/inventory,/stats) still recommended at UAT — not runnable here withoutDATA_DIRcard assets.