For example, on this page, $i \neq j$ is specified for the elementary row operation of row addition, but not for row switching. Of course, I understand that if $i = j$ and you switch rows $i$ and $j$, then you are just leaving the given matrix unchanged.
The reason I ask is because I was given the problem to find the determinant of the different kinds of elementary matrices and ordinarily if you exchange rows $i$ and $j$ with $i \neq j$, the determinant of the resulting elementary matrix is $-1$, but if $i = j$ is allowed, then that elementary matrix will just be the identity matrix and have a determinant of $1$. So I was unsure whether in my solution to the problem I would need to include the case where $i = j$ separately, or whether exchanging a row with itself is not defined as an elementary row operation.
You have a good eye for detail.
If this is for a class assignment, I suggest pointing out your observation. You could infer that row swapping is really only intended for $i\neq j$, but in the event that $i$ is allowed to equal $j$, the determinant is something different.
You could also express the determinant as $(-1)^{\operatorname{sign}(i-j)}$ or $(-1)^{\delta_{ij}}$, where $\delta_{ij}$ is the Kronecker delta.