[eslint-refiner] ESLint Refiner — 2026-07-10: no-github-request-interpolated-route verified precise; gaps already tracked #44670
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by ESLint Refiner. A newer discussion is available at Discussion #44880. |
Beta Was this translation helpful? Give feedback.
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
Today's review focused on
no-github-request-interpolated-route— the newest (13th) rule and, per my strategy, the one to lead with. A correction up front: my persisted strategy notes were stale (dated 2026-07-08, tracking only 12 rules). A run I hadn't recorded (run §28998707309) already reviewed this rule on 2026-07-09 and filed comprehensive follow-ups. I cross-checked GitHub (open and closed issues) to avoid duplicating that work, and have refreshed repo-memory accordingly.Outcome: rule verified sound and precise; 0 new issues filed — every meaningful, grounded gap is already tracked in
#44515(open) or shipped in#44550(merged). Duplicates explicitly skipped. Lower-priority candidate refinements are surfaced below for maintainer input rather than filed unilaterally on a rule that was just reviewed.Key metrics
index.ts)no-github-request-interpolated-route#44515,#43948)Rule health —
no-github-request-interpolated-routeThe rule is precise on live code. It flags full-path interpolation and non-constant
+concatenation of the route argument for the four known Octokit client names, and correctly ignores safe forms.Grounded true positives (rule working as intended)
route_slash_command.cjs:180 / 192 / 204 / 216—`POST /repos/${owner}/${repo}/issues/${issueNumber}/reactions`and siblings interpolate real values into the path.add_reaction.cjs:193andadd_reaction_and_edit_comment.cjs:266—`POST ${endpoint}`whereendpointresolves to an interpolated path.add_workflow_run_comment.cjs:444—"POST " + endpoint, whereendpointis`/repos/${owner}/${repo}/issues/${number}/comments`.All six are genuine value-into-route bypasses — the rule is surfacing real anti-patterns, not noise.
Correctly-unflagged forms (0 false positives)
update_project.cjs:877andcreate_project.cjs:252—github.request(route, params)whererouteis a safe literal ternary using typed placeholders.update_activation_comment.cjs:211—fallbackClient.request("POST /repos/{owner}/{repo}/...")— off-list client, static route.http.request/https.request(validate_secrets.cjs,mcp_cli_bridge.cjs,mount_mcp_as_cli.cjs) — correctly out of scope.Already tracked — not re-filed
#44515(open): the two false-negative gaps — client detection limited to a 4-name allow-list (misses aliased/off-list clients such asfallbackClient = options.targetGithubClient || githubatupdate_activation_comment.cjs:206) and variable-indirection routes. Its acceptance criteria already ask for scope-aware resolution while keepinghttp/httpsexcluded. Comprehensive; skipped as duplicate.#44550(merged 2026-07-09): pinned the rule's boundary behavior in tests, narrowed the constant-only+concatenation false positive (theisStaticRouteExpressionhelper), and documented all 13 rules in the README — which also resolves the long-standing "README documents only a subset of rules" doc debt.Candidate refinements (surfaced, not filed)
These are lower-priority and overlap with just-shipped work, so I'm raising them here for maintainer input instead of filing on a freshly-reviewed rule:
no-json-stringify-error,require-fs-sync-try-catch) the route rule offers no suggestion, and its message doesn't name the offending${...}segments. A correct autofix is genuinely hard here — each of the 6 live sites already passes a params object, and${issueNumber}→issue_numberparam-key extraction isn't mechanical — so this is a design decision (enrich the message vs. add a narrowly-scoped suggestion), not a mechanical fix.const-bound placeholder concatenation.#44550narrowed the literal-only concat FP, but"POST " + PATH_CONSTwherePATH_CONSTholds a placeholder path is still flagged. This is ungrounded today and would be resolved naturally by the scope resolution#44515already proposes — best folded there.TaggedTemplateExpressionbypass (minor).isInterpolatedTemplateLiteralonly inspectsTemplateLiteral, so a tagged template route would slip through. Cheap to close but exotic/ungrounded — noted for completeness.Adjacent verification
While confirming the broader rule set is healthy, I verified
prefer-number-isnanis fully fixed (prior#43486):hasLocalBindingnow recognizes any local definition including ESMImportBinding(variable.defs.length > 0), and the coercion caveat is carried in the suggestion message.Next actions
#44515/#43948.index.tsfor a 14th rule; if none appears, re-verify a recently-closed rule from current source for incomplete/regressed fixes.References:
no-github-request-interpolated-routeboundary behavior #44550Beta Was this translation helpful? Give feedback.
All reactions