I am currently working on Gasiorowicz's Quantum Physics. The writer says that since $\mathbf{L}^2$ and $L_z$ commute, we have simultaneous eigenket $|l,m\rangle$, and thus we can write \begin{align} \mathbf{L}^2|l,m\rangle & = \hbar l(l+1)|l,m\rangle \\ L_z |l,m\rangle & = \hbar m |l,m\rangle, \end{align} without any constraint for $l$ and $m$.
I don't understand why we can write the eigenvalues of $\mathbf{L}^2$ and $L_z$ to depend only on $l$ and $m$, respectively. Shouldn't we set the eigenvalue for $|l,m\rangle$ to be depending on both $l$ and $m$ to consider the most general situation?