{"record":{"id":"da06a4250aa24892","repo":"oxc-project/oxc","slug":"missing-parameters","errorCode":null,"errorMessage":"Missing parameters.","messagePattern":"Missing parameters\\.","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"warning","filePath":"crates/oxc_linter/src/rules/eslint/radix.rs","lineNumber":14,"sourceCode":"use oxc_ast::{\n    AstKind,\n    ast::{Argument, CallExpression, Expression, IdentifierReference},\n};\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::{GetSpan, Span};\nuse schemars::JsonSchema;\nuse serde::{Deserialize, Serialize};\n\nuse crate::{AstNode, context::LintContext, rule::Rule};\n\nfn missing_parameters(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing parameters.\")\n        .with_help(\"Add parameters for parsing numbers, e.g., `parseInt('10', 10)`.\")\n        .with_label(span)\n}\n\nfn missing_radix(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Missing radix parameter.\")\n        .with_help(\"Add radix parameter `10` for parsing decimal numbers, or specify the appropriate radix for other number formats.\")\n        .with_label(span)\n}\n\nfn invalid_radix(span: Span) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Invalid radix parameter, must be an integer between 2 and 36.\")\n        .with_help(\"The radix parameter should be an integer between 2 and 36, or a variable that is not `undefined`.\")\n        .with_label(span)\n}\n\n// `RadixType` has no effect, it is only here for backward compatibility.\n// Without it, the linter will report unknown rule configuration error.","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/eslint/radix.rs#L1-L32","documentation":"oxlint `eslint/radix`: `parseInt` was called with no arguments at all, which returns `NaN` and is almost certainly a bug. Emitted by `missing_parameters` (radix.rs:14) with help text 'Add parameters for parsing numbers, e.g., `parseInt(\\'10\\', 10)`'. The rule's purpose is to force an explicit radix so string-to-number parsing is deterministic across environments.","triggerScenarios":"A call expression whose callee resolves to the global `parseInt` (or `Number.parseInt`) with an empty argument list: `parseInt()`.","commonSituations":"Half-finished edits where the argument was deleted; bad find-and-replace; template-generated code with an unfilled placeholder.","solutions":["Pass the string and an explicit radix: `parseInt(\"10\", 10)`.","Review surrounding code — a zero-argument parseInt usually means an argument was accidentally removed.","If the value is not a string, consider `Number(value)` instead."],"exampleFix":"// before\nconst n = parseInt();\n\n// after\nconst n = parseInt(\"10\", 10);","handlingStrategy":"validation","validationCode":"# zero-argument parseInt calls\nrg -n --pcre2 '(Number\\.)?parseInt\\(\\s*\\)' src/","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat a zero-argument `parseInt()` as a compile-time bug: it always returns NaN.","Keep the `radix` rule enabled (suggestion category) so empty and radix-less calls are caught on save.","Use TypeScript — a zero-argument call is also a type error there."],"tags":["eslint","oxlint","parseint","radix","correctness","lint"],"backgroundTag":"parseint-radix","analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}