Dendritic growth is a leading cause of degradation and catastrophic failure of lithium-metal batteries. Deep understanding of this phenomenon would facilitate the design of strategies to reduce, or completely suppress, the instabilities characterizing electrodeposition on the lithium anode. We present a linear-stability analysis, which utilizes the Poisson-Nernst-Planck equations to describe Li-ion transport and, crucially, accounts for the lack of electroneutrality. This allows us to investigate the impact of electric-field gradients near the electrode surface on both ion diffusion and its anisotropy. Our analysis indicates that the use of anisotropic electrolytes (i.e., electrolytes with anisotropic diffusion coefficients of the Li ions) and the control of the local electric field can suppress dendritic growth of lithium metal. Specifically, changes in the local electric field can be used to enhance the longitudinal (perpendicular to the electrode) component of the cation diffusion coefficient tensor, which decreases the maximum growth rate of the dendrites. Electrolytes with electric field-dependent diffusion coefficients would reduce dendritic growth in small batteries, while anisotropic electrolytes (or separators with anisotropic pore structures or columnized membranes) are appropriate for batteries of any size.