eval echo {1..$n}
eval "echo {1..$n}"
Using eval somecommand {1..$n}
depends both on bash
silently failing to interpret the brace expansion, and on it passing
failing brace expansions literally.
Rather than depending on these questionable features (which already behave differently in other shells), use the explicit, predictable way of passing values literally: quoting.
None.
ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.