---
title: Avoid Using The ParseInt Function Without An Explicit Base Parameter
description: "Impact Area Manageability Severity High Affected Element Lightning ## Rule ID **SF-0059** ## Impact The second parameter to the `parseInt` function specifies the base for the conversion operation. This parameter is optional and usually defaults to 10 (base/radix is 10 for a…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/pmd-rules/avoid-using-the-parseint-function-without-an-explicit-base-parameter/"
updated: "2025-03-21"
category: PMD Rules
---

# Avoid Using The ParseInt Function Without An Explicit Base Parameter

Impact Area

Manageability

Severity

High

           Affected Element

Lightning

## Rule ID

**SF-0059**

## Impact

The second parameter to the `parseInt` function specifies the base for the conversion operation. This parameter is optional and usually defaults to 10 (base/radix is 10 for a decimal number). But different implementations may behave differently, causing unwanted results. It also improves readability, if the base is given.

## Remediation

Always specify the second parameter to the `parseInt` function.

### Time to fix

45 min

## References

See the PMD documentation article: [UseBaseWithParseInt](https://pmd.github.io/latest/pmd_rules_ecmascript_bestpractices.html#usebasewithparseint).
