Skip to content

eslint-factory: add a suggestion fix + fix broken docs URL for require-parseInt-radix #42016

Description

@github-actions

Summary

Two diagnostic-quality gaps in require-parseInt-radix (eslint-factory/src/rules/require-parseInt-radix.ts), both in the spirit of the recent #42000 work on the sibling JSON rule:

1. No ESLint suggestion. require-json-parse-try-catch now sets hasSuggestions: true and offers a suggest fix. require-parseInt-radix only reports a message — a developer must hand-edit each site. Offering an explicit suggestion that inserts a default , 10 radix would speed remediation of the real sites (e.g. the 5 in parse_codex_log.cjs).

2. Broken docs URL. The rule's RuleCreator points at:

https://github.com/github/gh-aw/tree/main/actions/setup/js/eslint-factory#require-parseInt-radix

but eslint-factory lives at the repo root, not under actions/setup/js. The sibling rule correctly uses https://github.com/github/gh-aw/tree/main/eslint-factory#.... The current URL 404s.

Acceptance criteria

  • meta.hasSuggestions: true and a suggest entry that inserts , 10 as the radix argument of the flagged parseInt / Number.parseInt call (insert before the closing paren of the call's single argument).
  • A new messageId for the suggestion (e.g. addRadix10) explaining that 10 is a safe default but the author should pick the correct base (the fix must be a manual suggestion, never an auto-fix, since 16/8 are legitimate for some inputs).
  • Fix the RuleCreator URL to https://github.com/github/gh-aw/tree/main/eslint-factory#${name} to match the sibling rule and the actual directory layout.
  • Tests covering the suggestion output and asserting the corrected docs URL (depends on / pairs with the test-suite task).

Scope

eslint-factory/** only.

Filed by ESLint Refiner (daily run 2026-06-28).

Generated by 🤖 ESLint Refiner · 178.3 AIC · ⌖ 11.7 AIC · ⊞ 4.7K ·

  • expires on Jul 4, 2026, 10:44 PM UTC-08:00

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions