Summary
The require-parseInt-radix rule (eslint-factory/src/rules/require-parseInt-radix.ts) ships with no test file. Its sibling require-json-parse-try-catch has a comprehensive suite (require-json-parse-try-catch.test.ts, 6 cases covering valid / invalid / suggestion / computed-access), but require-parseInt-radix has none. This leaves the rule regression-prone: a refactor (e.g. the kind in #42000) could silently break detection or introduce false positives with nothing to catch it.
The rule is live (eslint.config.cjs enables it as warn) and currently flags real defects — e.g. missing-radix sites in actions/setup/js/parse_codex_log.cjs (lines 32, 145, 146, 798, 806).
Acceptance criteria
- New file
eslint-factory/src/rules/require-parseInt-radix.test.ts using RuleTester + vitest, mirroring the style of require-json-parse-try-catch.test.ts.
- Valid cases:
parseInt(str, 10), parseInt(str, 16), Number.parseInt(str, 10), and non-parseInt calls (foo.parseInt(x), parseFloat(x)).
- Invalid cases (report
requireRadix): parseInt(str), parseInt(str.trim()), Number.parseInt(str).
- Cover both CommonJS and ES module
sourceType (the config lints .cjs as commonjs, tests as module).
npm test (vitest) passes in eslint-factory.
Scope
eslint-factory/** only. No change to rule logic in this task.
Filed by ESLint Refiner (daily run 2026-06-28).
Generated by 🤖 ESLint Refiner · 178.3 AIC · ⌖ 11.7 AIC · ⊞ 4.7K · ◷
Summary
The
require-parseInt-radixrule (eslint-factory/src/rules/require-parseInt-radix.ts) ships with no test file. Its siblingrequire-json-parse-try-catchhas a comprehensive suite (require-json-parse-try-catch.test.ts, 6 cases covering valid / invalid / suggestion / computed-access), butrequire-parseInt-radixhas none. This leaves the rule regression-prone: a refactor (e.g. the kind in #42000) could silently break detection or introduce false positives with nothing to catch it.The rule is live (
eslint.config.cjsenables it aswarn) and currently flags real defects — e.g. missing-radix sites inactions/setup/js/parse_codex_log.cjs(lines 32, 145, 146, 798, 806).Acceptance criteria
eslint-factory/src/rules/require-parseInt-radix.test.tsusingRuleTester+ vitest, mirroring the style ofrequire-json-parse-try-catch.test.ts.parseInt(str, 10),parseInt(str, 16),Number.parseInt(str, 10), and non-parseInt calls (foo.parseInt(x),parseFloat(x)).requireRadix):parseInt(str),parseInt(str.trim()),Number.parseInt(str).sourceType(the config lints.cjsas commonjs, tests as module).npm test(vitest) passes ineslint-factory.Scope
eslint-factory/**only. No change to rule logic in this task.Filed by ESLint Refiner (daily run 2026-06-28).