[eslint-refiner] ESLint Refiner — Daily Report 2026-07-17 #46152
Closed
Replies: 1 comment
|
This discussion has been marked as outdated by ESLint Refiner. A newer discussion is available at Discussion #46357. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Overview
First triage pass over the 7 new rules added since the last run (rule count 12 → 19). The
eslint-factoryrule set is in strong shape: the newly-added rules are well-constructed, and theactions/setup/jscodebase is disciplined about error handling, so grounded defects are scarce. Two false-positive-prevention refinements were filed on previously-untriaged rules; overlapping areas already covered by open issues were deliberately skipped.Key metrics
apply_samples.cjs:97)Issues filed
require-spawnsync-error-check— false positive whenresult.erroris guarded through an intermediate variable.const e = result.error; if (e) throw e;is reported becauseisGuardingErrorUsagedoes not follow a single-assignment alias from the.errorread to the later guard. Affects both the simple-identifier and object-pattern branches.require-new-url-try-catch— false positives for provably non-throwing arguments. Compile-time constant string concatenation (new URL("(x/redacted)" + "/y")) andimport.meta.urlas the sole/first argument (isKnownSafeBaseis only consulted for the base argument) are flagged even though they cannot throw. This aligns the rule with the siblingno-github-request-interpolated-route, which already accepts compile-time constants.Both are logic-derived precision refinements with concrete repros and acceptance criteria; neither has a live escaping site today (filed to prevent future noise).
New-rule triage detail
Per-rule assessment of the 7 new rules
require-spawnsync-error-check— Good. Correctly flags a genuine latent bug:apply_samples.cjs:97(runGit) checks onlyresult.status, neverresult.error, so a spawn failure (ENOENT/ETIMEDOUT) yields a misleadingexit nullmessage with no cause. Rules run atwarnseverity, so this real defect persists — worth a follow-up code fix.require-new-url-try-catch— Good.generate_history_link.cjs:61correctly flagged (true positive);awf_reflect.cjs:140correctly ignored (already wrapped). Ungrounded FN class: aliased / namespacedURL(const U = URL; new U(x),new globalThis.URL(x)).require-mkdirsync-try-catch— Good, and the prior destructured-fsfalse negative is now fixed in the sharedcreateFsSyncMethodResolver. One asymmetry:require-fs-sync-try-catchpasses{ allowUnboundFsIdentifier: true }while this rule does not, so an ambient/unresolvedfs.mkdirSync(...)is a latent false negative. Not filed — it overlaps the open “Consolidate require-mkdirsync-try-catch into require-fs-sync-try-catch” issue and all livemkdirSyncsites bindfsviarequire. Recommend the consolidation reconcile the resolver option.no-throw-plain-object— Good.isJsonRpcErrorShapeexempts{ code: <negative int literal>, message, data? }; all live throws (mcp_server_core.cjs721–816,safe_outputs_handlers.cjs) match and are correctly not flagged. Latent FP only ifcodeis a named constant (all repo throws use literals).require-return-after-core-setfailed— Robust. Handles nested blocks, cross-block continuation, loop back-edges, switch fall-through, core aliases, and destructuredsetFailed. All livecore.setFailed()sites (check_skip_if_helpers.cjs,setup_threat_detection.cjs) are correctly followed byreturn. Documented limitation:break/continueaccepted even though post-loop code still runs.no-core-exportvariable-non-string— Twin ofno-core-setoutput-non-stringvia the sharednonStringKindhelper, so it inherits the same gaps already tracked in eslint-factory: no-core-setoutput-non-string only recognizes .length; misses .number/.size (live FN in close_entity_helpers.cjs) #42682 (misses unary/negative numeric literals such as-1; only.length). Not re-filed to avoid duplicating eslint-factory: no-core-setoutput-non-string only recognizes .length; misses .number/.size (live FN in close_entity_helpers.cjs) #42682 — fixingnonStringKindfixes both rules at once.no-github-request-interpolated-route— Already has an open scope-resolution FN issue; skipped.Deduplication
Open issues consulted; areas intentionally skipped
[eslint-monster] [Code Quality]× 2 — application-side fixes (wrap fs/mkdirSync in try/catch; normalize error handling). Not rule-refinement work.[Code Quality] Consolidate require-mkdirsync-try-catch into require-fs-sync-try-catch— covers the mkdirsync/fs-sync relationship, including the resolver-option asymmetry noted above.[Code Quality] Document ESLint factory rules 13–18 in the eslint-factory README— README doc-debt already tracked.no-github-request-interpolated-routescope-resolution false negatives — already open.Next actions
index.tsregistrations against the persistedrules[](19) to catch any newer untriaged rule and lead with it.allowUnboundFsIdentifieroption so the ambient-fsfalse negative cannot regress.apply_samples.cjs:97to checkresult.error(the rule already surfaces it atwarn).References: §29558764310
All reactions