Search for, propose, and examine implementing a linter rule for classic traps in zsh scripts, as classic POSIX traps have a nasty habit of resetting in assorted shell script contexts.
If ShellCheck can't do it, then there may not be a reliable way to do it ourselves without implementing a POSIX sh + bash + zsh triple AST parsing linter ourselves. That's a lot of work, times three.
Search for, propose, and examine implementing a linter rule for classic traps in zsh scripts, as classic POSIX traps have a nasty habit of resetting in assorted shell script contexts.